fixed seed lecacy
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
|
||||||
|
flavor = Flavor.objects.filter(name=name, category=cat).first()
|
||||||
|
|
||||||
# Try to find existing flavor by name and category
|
# If it exists and is an active Shopify product, skip legacy processing
|
||||||
flavor = Flavor.objects.filter(name=name, category=cat, is_legacy=True).first()
|
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(
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 3.0 MiB After Width: | Height: | Size: 1.7 MiB |
|
Before Width: | Height: | Size: 3.0 MiB After Width: | Height: | Size: 1.7 MiB |
|
Before Width: | Height: | Size: 3.2 MiB After Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 2.6 MiB After Width: | Height: | Size: 3.1 MiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.8 MiB |