add fix currency
This commit is contained in:
parent
791ff3f1c3
commit
398a982c82
|
|
@ -23,8 +23,9 @@ class Command(BaseCommand):
|
|||
except Establishment.DoesNotExist:
|
||||
continue
|
||||
else:
|
||||
if resp.status_code == requests.codes.ok:
|
||||
country_list = resp.json()
|
||||
if country_list:
|
||||
if isinstance(country_list, list):
|
||||
currency_dict = country_list[0].get("currency")
|
||||
if currency_dict:
|
||||
name = currency_dict.get("name")
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user