fixed seed lecacy

This commit is contained in:
nvrl committed 2026-03-19 16:14:59 +01:00
1 parent 33a41a959d
commit 1b43b27bcf
6 files changed
+7 -3

No files matched your search

@@ -103,9 +103,13 @@ class Command(BaseCommand):
cat = cat_map['packs'] cat = cat_map['packs']
else: else:
cat = cat_map['energy'] # Ultimate fallback cat = cat_map['energy'] # Ultimate fallback
# Try to find existing flavor by name and category regardless of legacy status
# Try to find existing flavor by name and category flavor = Flavor.objects.filter(name=name, category=cat).first()
flavor = Flavor.objects.filter(name=name, category=cat, is_legacy=True).first()
# If it exists and is an active Shopify product, skip legacy processing
if flavor and not flavor.is_legacy:
self.stdout.write(f"Skipping active flavor: {name}")
continue
if not flavor: if not flavor:
flavor = Flavor( flavor = Flavor(
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

After

Width:  |  Height:  |  Size: 3.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB