update hatching
This commit is contained in:
@@ -975,7 +975,7 @@ class HatchingsViewSet(viewsets.ModelViewSet):
|
||||
hatching.PedigreeName = BREED_STANDARDIZATION[hatching.PedigreeName]
|
||||
hatching.KillingAve = ave_age
|
||||
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()
|
||||
else:
|
||||
print('تعداد حمل صفر است')
|
||||
|
||||
Reference in New Issue
Block a user