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