fix - edit quota bug on org
This commit is contained in:
@@ -546,6 +546,7 @@ class Quota(BaseModel):
|
|||||||
quota=self,
|
quota=self,
|
||||||
organization=org
|
organization=org
|
||||||
)
|
)
|
||||||
|
|
||||||
# first quota created is none stat on attribute & broker value table
|
# first quota created is none stat on attribute & broker value table
|
||||||
if stat.first().stat_type == 'quota':
|
if stat.first().stat_type == 'quota':
|
||||||
return None
|
return None
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ class QuotaSerializer(serializers.ModelSerializer):
|
|||||||
representation['assigned_organizations'] = [{
|
representation['assigned_organizations'] = [{
|
||||||
"name": org.name, "id": org.id
|
"name": org.name, "id": org.id
|
||||||
} for org in assigned_orgs]
|
} for org in assigned_orgs]
|
||||||
|
else:
|
||||||
|
org = None
|
||||||
|
|
||||||
if instance.sale_unit:
|
if instance.sale_unit:
|
||||||
representation['sale_unit'] = product_serializers.SaleUnitSerializer(
|
representation['sale_unit'] = product_serializers.SaleUnitSerializer(
|
||||||
|
|||||||
Reference in New Issue
Block a user