mirror of
https://github.com/narrrl/holy-flavor-rater.git
synced 2026-11-03 16:41:27 +01:00
updated sync flavor to respect legacy flavors and merge
This commit is contained in:
1 parent
b90a227149
commit
f3ca748c55
1 file changed
+8
@@ -142,6 +142,14 @@ class Command(BaseCommand):
|
||||
if flavor.is_legacy:
|
||||
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:
|
||||
# Check if local file exists
|
||||
file_exists = False
|
||||
|
||||
Reference in new issue
Block a user