fix - dont increase inventory entry of parents - just my org / registere rfg
This commit is contained in:
@@ -138,11 +138,7 @@ class QuotaStatsService:
|
||||
stat_queryset = OrganizationQuotaStats.objects.select_related('quota', 'organization')
|
||||
update_my_remaining_stat = True
|
||||
|
||||
parent_orgs = []
|
||||
|
||||
while org:
|
||||
parent_orgs.append(org)
|
||||
org = org.parent_organization
|
||||
parent_orgs = [org]
|
||||
|
||||
parent_orgs_ids = [org.id for org in parent_orgs]
|
||||
|
||||
|
||||
@@ -55,13 +55,7 @@ class WarehouseAllocationService:
|
||||
status.HTTP_400_BAD_REQUEST
|
||||
)
|
||||
|
||||
org = entry.organization.parent_organization
|
||||
parent_orgs = []
|
||||
while org:
|
||||
# import parent org to list
|
||||
parent_orgs.append(org)
|
||||
org = org.parent_organization
|
||||
|
||||
parent_orgs = [entry.quota.registerer_organization]
|
||||
parent_org_ids = [org.id for org in parent_orgs]
|
||||
|
||||
target_org_ids = set(parent_org_ids)
|
||||
|
||||
Reference in New Issue
Block a user