update HatchingsViewSet
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -796,7 +796,7 @@ class HatchingsViewSet(viewsets.ModelViewSet):
|
|||||||
'ایند<EFBFBD><EFBFBD>ن ریور': 'ایندین ریور',
|
'ایند<EFBFBD><EFBFBD>ن ریور': 'ایندین ریور',
|
||||||
'ک<EFBFBD><EFBFBD>ب': 'کاب'
|
'ک<EFBFBD><EFBFBD>ب': 'کاب'
|
||||||
}
|
}
|
||||||
if int(request.data['GoodSum']) > 0:
|
# if int(request.data['GoodSum']) > 0:
|
||||||
poultry_data = {}
|
poultry_data = {}
|
||||||
|
|
||||||
same_keys = [
|
same_keys = [
|
||||||
@@ -968,8 +968,8 @@ class HatchingsViewSet(viewsets.ModelViewSet):
|
|||||||
hatching.samasat_discharge_percentage = int(
|
hatching.samasat_discharge_percentage = int(
|
||||||
((hatching.Evacuation + bars_quantity) / hatching.ChickCountSum) * 100)
|
((hatching.Evacuation + bars_quantity) / hatching.ChickCountSum) * 100)
|
||||||
hatching.save()
|
hatching.save()
|
||||||
else:
|
# else:
|
||||||
print('تعداد حمل صفر است')
|
# print('تعداد حمل صفر است')
|
||||||
return Response({"result": "با موفقیت ثبت شد"}, status=status.HTTP_201_CREATED)
|
return Response({"result": "با موفقیت ثبت شد"}, status=status.HTTP_201_CREATED)
|
||||||
|
|
||||||
def list(self, request, *args, **kwargs):
|
def list(self, request, *args, **kwargs):
|
||||||
|
|||||||
Reference in New Issue
Block a user