1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-24 15:29:36 +02:00

Merge pull request #208 from seanmorley15/development

Add world travel regions initially
This commit is contained in:
Sean Morley 2024-08-16 10:40:55 -04:00 committed by GitHub
commit 281f337dc1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -524,6 +524,7 @@ class Command(BaseCommand):
('IS-7', 'Austurland', 'is'),
('IS-8', 'Suðurland', 'is'),
]
if not force and (Country.objects.exists() or Region.objects.exists()):
self.stdout.write(self.style.WARNING(
@ -582,8 +583,10 @@ class Command(BaseCommand):
defaults={'name': name, 'continent': continent}
)
if created:
saveCountryFlag(country_code)
self.stdout.write(f'Inserted {name} into worldtravel countries')
else:
saveCountryFlag(country_code)
self.stdout.write(f'{name} already exists in worldtravel countries')
def insert_regions(self, regions):