fix - wrong imported signals in warehouse app

This commit is contained in:
2025-12-10 10:50:25 +03:30
parent d3e9929bbc
commit a2d42ff701
3 changed files with 3 additions and 2 deletions

View File

@@ -66,7 +66,7 @@ def create_org_stat_by_distribution(quota: Quota):
inventory_received=dist.warehouse_entry,
inventory_entry_balance=dist.warehouse_balance,
sold_amount=dist.been_sold,
stat_type="distributions",
stat_type="distribution",
)
if created:

View File

@@ -6,5 +6,5 @@ class WarehouseConfig(AppConfig):
name = 'apps.warehouse'
def ready(self):
import apps.warehouse.signals # noqa
import apps.warehouse.signals.signals_v1 # noqa
import apps.warehouse.signals.signals_v2 # noqa

View File

@@ -56,6 +56,7 @@ def warehouse_sold_and_balance(quota_distribution: QuotaDistribution):
@receiver(post_init, sender=InventoryEntry)
def inventory_entry_pre_save(sender, instance: InventoryEntry, **kwargs):
print("ssss")
if instance.pk:
instance._is_update = True
instance._old_weight = instance.weight