From cf2bb89e4ccb308cceb95db9d9df2a2bf079ed0d Mon Sep 17 00:00:00 2001 From: behruz-dev Date: Wed, 12 Nov 2025 13:56:25 +0500 Subject: [PATCH] fix --- core/apps/orders/management/commands/import_party_by_number.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/apps/orders/management/commands/import_party_by_number.py b/core/apps/orders/management/commands/import_party_by_number.py index 9fa1a6a..d89fba4 100644 --- a/core/apps/orders/management/commands/import_party_by_number.py +++ b/core/apps/orders/management/commands/import_party_by_number.py @@ -113,7 +113,7 @@ class Command(BaseCommand): debt_amount += i['debt_amount'] orders.append(order) party.orders.set(orders) - PartyAmount.objects.get_or_create( + PartyAmount.objects.update_or_create( party=party, defaults={ "total_price": total_price,