update hatching
This commit is contained in:
@@ -975,7 +975,7 @@ class HatchingsViewSet(viewsets.ModelViewSet):
|
|||||||
hatching.PedigreeName = BREED_STANDARDIZATION[hatching.PedigreeName]
|
hatching.PedigreeName = BREED_STANDARDIZATION[hatching.PedigreeName]
|
||||||
hatching.KillingAve = ave_age
|
hatching.KillingAve = ave_age
|
||||||
hatching.samasat_discharge_percentage = int(
|
hatching.samasat_discharge_percentage = int(
|
||||||
((hatching.Evacuation + bars_quantity) / hatching.ChickCountSum) * 100)
|
((hatching.Evacuation + bars_quantity) / hatching.ChickCountSum) * 100) if hatching.ChickCountSum > 0 else 0
|
||||||
hatching.save()
|
hatching.save()
|
||||||
else:
|
else:
|
||||||
print('تعداد حمل صفر است')
|
print('تعداد حمل صفر است')
|
||||||
|
|||||||
Reference in New Issue
Block a user