fix: small fixes to the new import/export (#12064)

This commit is contained in:
Beto Dealmeida
2020-12-15 12:24:24 -08:00
committed by GitHub
parent 52e970a520
commit e0079bb5ae
7 changed files with 47 additions and 10 deletions

View File

@@ -50,7 +50,7 @@ class ExportDatabasesCommand(ExportModelsCommand):
)
# TODO (betodealmeida): move this logic to export_to_dict once this
# becomes the default export endpoint
if "extra" in payload:
if payload.get("extra"):
try:
payload["extra"] = json.loads(payload["extra"])
except json.decoder.JSONDecodeError: