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