From 8bf7ab61e4ab8b4c444b74265422bb4a8569eaf1 Mon Sep 17 00:00:00 2001 From: 7nimor <7nimor@gmail.com> Date: Sat, 7 Feb 2026 15:43:21 +0330 Subject: [PATCH] update hatching --- app/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views.py b/app/views.py index 2f5ecd5..843b2e0 100644 --- a/app/views.py +++ b/app/views.py @@ -806,7 +806,8 @@ class HatchingsViewSet(viewsets.ModelViewSet): 'MenuUserAccess', 'LogTableName', 'LogTableAlias', 'PageTitle', 'PartIdCode', 'UnitTypeName' ] - if int(request.data['GoodSum']['loadingSum ']) > 0: + good_sum = request.data.get('GoodSum', []) + if int(good_sum.get('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]