fix - warehouse allocation service
This commit is contained in:
@@ -56,10 +56,12 @@ class WarehouseAllocationService:
|
||||
|
||||
org = entry.organization.parent_organization
|
||||
while org:
|
||||
stat = OrganizationQuotaStats.objects.get(
|
||||
stat = OrganizationQuotaStats.objects.filter(
|
||||
quota=entry.quota,
|
||||
organization=org
|
||||
)
|
||||
stat.inventory_received += entry.weight
|
||||
stat.save()
|
||||
org = org.parent_organization
|
||||
if stat.exists():
|
||||
stat = stat.first()
|
||||
stat.inventory_received += entry.weight
|
||||
stat.save()
|
||||
org = org.parent_organization
|
||||
|
||||
Reference in New Issue
Block a user