command script

This commit is contained in:
Faheedkhan 2025-07-27 18:26:02 +03:00
parent bccf7a1481
commit 86c7098606
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ class Command(BaseCommand):
count = opts['count']
client = Client() # lives inside management command
for n in range(1, 10):
for n in range(5, 7):
self.stdout.write(f"🚗 Seeding dealer #{n}")
self._create_dealer(client, n)
# self._create_cars(client, n)

View File

@ -500,7 +500,7 @@ def create_item_service(sender, instance, created, **kwargs):
"""
if created:
entity = instance.dealer.entity
uom = entity.get_uom_all().get(unit_abbr=instance.uom)
uom = entity.get_uom_all().get(name=str(instance.uom).lower())
cogs = (
entity.get_all_accounts()
.filter(role=roles.COGS, active=True, role_default=True)