Do not save content on imported json file after processing it; we don't need this anymore, we will use api to get client id and secret

This commit is contained in:
Benoit Suttor 2020-07-15 10:29:48 +02:00
parent ce0b0a7ee1
commit 149b45e355
1 changed files with 4 additions and 5 deletions

View File

@ -80,9 +80,9 @@ class Command(BaseCommand):
if not isinstance(contents, list):
contents = [contents]
self.do(contents=contents)
contents = {"data": contents}
with open(path, "w") as fd:
json.dump(contents, fd, indent=4)
# contents = {"data": contents}
# with open(path, "w") as fd:
# json.dump(contents, fd, indent=4)
def info(self, *args, **kwargs):
if self.verbosity >= 1:
@ -92,8 +92,7 @@ class Command(BaseCommand):
def do(self, contents):
for content in contents:
locality = content.get(
"locality",
{"name": "Collectivité par défaut", "slug": "default"},
"locality", {"name": "Collectivité par défaut", "slug": "default"},
)
self.info("Locality %s" % locality["name"], ending=" ")