Fix est_type.id
This commit is contained in:
parent
41670729d5
commit
1d8b707c3c
|
|
@ -398,7 +398,7 @@ class IsWineryReviewer(IsStandardUser):
|
||||||
|
|
||||||
est = EstablishmentSubType.objects.filter(establishment_type_id=request.data['type_id'])
|
est = EstablishmentSubType.objects.filter(establishment_type_id=request.data['type_id'])
|
||||||
if est.exists():
|
if est.exists():
|
||||||
role = Role.objects.filter(establishment_subtype_id__in=[type.id for type in est],
|
role = Role.objects.filter(establishment_subtype_id__in=[est_type.id for est_type in est],
|
||||||
role=Role.WINERY_REVIEWER,
|
role=Role.WINERY_REVIEWER,
|
||||||
country_id__in=[country.id for country in countries]) \
|
country_id__in=[country.id for country in countries]) \
|
||||||
.first()
|
.first()
|
||||||
|
|
@ -423,7 +423,7 @@ class IsWineryReviewer(IsStandardUser):
|
||||||
|
|
||||||
est = EstablishmentSubType.objects.filter(establishment_type_id=type_id)
|
est = EstablishmentSubType.objects.filter(establishment_type_id=type_id)
|
||||||
role = Role.objects.filter(role=Role.WINERY_REVIEWER,
|
role = Role.objects.filter(role=Role.WINERY_REVIEWER,
|
||||||
establishment_subtype_id__in=[id for type.id in est],
|
establishment_subtype_id__in=[est_type.id for est_type in est],
|
||||||
country_id=obj.country_id).first()
|
country_id=obj.country_id).first()
|
||||||
|
|
||||||
object_id: int
|
object_id: int
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user