diff --git a/apps/location/transfer_data.py b/apps/location/transfer_data.py index 797077b3..3837de28 100644 --- a/apps/location/transfer_data.py +++ b/apps/location/transfer_data.py @@ -186,6 +186,15 @@ def update_flags(): query.save() +def update_fake_country_flag(): + link_to_request = "https://s3.eu-central-1.amazonaws.com/gm-test.com/media/svg/country/10-31-2019/aa.svg" + resp = get(link_to_request) + if resp.status_code == 200: + country = Country.objects.get(code="aa") + country.svg_image = link_to_request + country.save() + + def migrate_city_map_situation(get_exists_cities=False): if get_exists_cities: ids = City.objects.values_list('mysql_id', flat=True) @@ -822,5 +831,6 @@ data_types = { ], "setup_clean_db": [setup_clean_db], - "set_unused_regions": [set_unused_regions] + "set_unused_regions": [set_unused_regions], + "update_fake_country_flag": [update_fake_country_flag] } diff --git a/apps/transfer/management/commands/transfer.py b/apps/transfer/management/commands/transfer.py index ab3e1749..802f0989 100644 --- a/apps/transfer/management/commands/transfer.py +++ b/apps/transfer/management/commands/transfer.py @@ -58,6 +58,7 @@ class Command(BaseCommand): 'setup_clean_db', 'languages', # №4 - перенос языков 'set_unused_regions', + 'update_fake_country_flag' ] def handle(self, *args, **options):