quota error on values like atttr, broker ,....
This commit is contained in:
@@ -66,6 +66,7 @@ class AttributeValueSerializer(serializers.ModelSerializer):
|
||||
model = product_models.AttributeValue
|
||||
fields = [
|
||||
"id",
|
||||
"quota",
|
||||
"attribute",
|
||||
"value",
|
||||
]
|
||||
|
||||
@@ -104,6 +104,7 @@ class QuotaIncentiveAssignmentSerializer(serializers.ModelSerializer):
|
||||
model = product_models.QuotaIncentiveAssignment
|
||||
fields = [
|
||||
"id",
|
||||
"quota",
|
||||
"incentive_plan",
|
||||
"heavy_value",
|
||||
"light_value",
|
||||
@@ -134,6 +135,7 @@ class QuotaBrokerValueSerializer(serializers.ModelSerializer): # noqa
|
||||
model = product_models.QuotaBrokerValue
|
||||
fields = [
|
||||
"id",
|
||||
"quota",
|
||||
"broker",
|
||||
"value",
|
||||
]
|
||||
@@ -162,6 +164,7 @@ class QuotaLiveStockAllocationSerializer(serializers.ModelSerializer):
|
||||
model = product_models.QuotaLivestockAllocation
|
||||
fields = [
|
||||
"id",
|
||||
"quota",
|
||||
"livestock_group",
|
||||
"livestock_type",
|
||||
"livestock_subtype",
|
||||
@@ -205,6 +208,7 @@ class QuotaLiveStockAgeLimitationSerializer(serializers.ModelSerializer):
|
||||
model = product_models.QuotaLiveStockAgeLimitation
|
||||
fields = [
|
||||
"id",
|
||||
"quota",
|
||||
"livestock_type",
|
||||
"livestock_subtype",
|
||||
"age_month",
|
||||
|
||||
@@ -79,6 +79,7 @@ class QuotaViewSet(viewsets.ModelViewSet): # noqa
|
||||
data=attr
|
||||
)
|
||||
attributes_value_list.append(attributes)
|
||||
|
||||
# create product broker values for quota
|
||||
broker_data_list = []
|
||||
if 'broker_data' in request.data.keys():
|
||||
@@ -102,6 +103,7 @@ class QuotaViewSet(viewsets.ModelViewSet): # noqa
|
||||
data=ls_alloc
|
||||
)
|
||||
allocations_list.append(allocations)
|
||||
|
||||
# create livestock age limits for quota
|
||||
livestock_age_limits = []
|
||||
if 'livestock_age_limitations' in request.data.keys():
|
||||
|
||||
Reference in New Issue
Block a user