update hatching
This commit is contained in:
@@ -806,7 +806,7 @@ class HatchingsViewSet(viewsets.ModelViewSet):
|
||||
'MenuUserAccess', 'LogTableName', 'LogTableAlias', 'PageTitle',
|
||||
'PartIdCode', 'UnitTypeName'
|
||||
]
|
||||
|
||||
if int(request.data['GoodSum']['loadingSum ']) > 0:
|
||||
for key in same_keys:
|
||||
if key in request.data and request.data[key] is not None:
|
||||
poultry_data[key] = request.data[key]
|
||||
@@ -975,8 +975,8 @@ class HatchingsViewSet(viewsets.ModelViewSet):
|
||||
hatching.samasat_discharge_percentage = int(
|
||||
((hatching.Evacuation + bars_quantity) / hatching.ChickCountSum) * 100)
|
||||
hatching.save()
|
||||
# else:
|
||||
# print('تعداد حمل صفر است')
|
||||
else:
|
||||
print('تعداد حمل صفر است')
|
||||
return Response({"result": "با موفقیت ثبت شد"}, status=status.HTTP_201_CREATED)
|
||||
|
||||
def list(self, request, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user