Add kyc_profile_uuid to SupplierProfile and getSupplierProfileByTeam query
All checks were successful
Build Docker Image / build (push) Successful in 3m12s
All checks were successful
Build Docker Image / build (push) Successful in 3m12s
This commit is contained in:
@@ -54,6 +54,11 @@ class PublicQuery(graphene.ObjectType):
|
||||
is_verified=graphene.Boolean(),
|
||||
)
|
||||
get_supplier_profile = graphene.Field(SupplierProfileType, uuid=graphene.String(required=True))
|
||||
get_supplier_profile_by_team = graphene.Field(
|
||||
SupplierProfileType,
|
||||
team_uuid=graphene.String(required=True),
|
||||
description="Get supplier profile by team UUID"
|
||||
)
|
||||
get_offers = graphene.List(
|
||||
OfferType,
|
||||
status=graphene.String(),
|
||||
@@ -125,6 +130,12 @@ class PublicQuery(graphene.ObjectType):
|
||||
except SupplierProfile.DoesNotExist:
|
||||
return None
|
||||
|
||||
def resolve_get_supplier_profile_by_team(self, info, team_uuid):
|
||||
try:
|
||||
return SupplierProfile.objects.get(team_uuid=team_uuid)
|
||||
except SupplierProfile.DoesNotExist:
|
||||
return None
|
||||
|
||||
@staticmethod
|
||||
def _get_offers_queryset(status=None, product_uuid=None, location_uuid=None, category_name=None, team_uuid=None):
|
||||
queryset = Offer.objects.all()
|
||||
|
||||
@@ -10,6 +10,7 @@ class SupplierProfile(models.Model):
|
||||
"""
|
||||
uuid = models.CharField(max_length=100, unique=True, default=uuid.uuid4)
|
||||
team_uuid = models.CharField(max_length=100, unique=True) # Связь с Team
|
||||
kyc_profile_uuid = models.CharField(max_length=100, blank=True, default='') # Связь с KYCProfile
|
||||
|
||||
name = models.CharField(max_length=255)
|
||||
description = models.TextField(blank=True, default='')
|
||||
|
||||
Reference in New Issue
Block a user