updated sync flavor to respect legacy flavors and merge

This commit is contained in:
nvrl committed 2026-03-20 11:02:32 +01:00
1 parent b90a227149
commit f3ca748c55
1 file changed
+8
@@ -142,6 +142,14 @@ class Command(BaseCommand):
if flavor.is_legacy: if flavor.is_legacy:
flavor.is_legacy = False flavor.is_legacy = False
# Ensure all synced fields are accurately reflected
if flavor.name != title and not Flavor.objects.filter(name=title, category=category).exclude(pk=flavor.pk).exists():
flavor.name = title
flavor.description = description
flavor.shop_url = shop_url
flavor.is_available = is_available
if image_url: if image_url:
# Check if local file exists # Check if local file exists
file_exists = False file_exists = False