chore: rename IMPORT_EXPORT_VERSION (#11636)

This commit is contained in:
Beto Dealmeida
2020-11-10 09:45:45 -08:00
committed by GitHub
parent 3b89d2307a
commit cf868891be
7 changed files with 16 additions and 16 deletions

View File

@@ -27,7 +27,7 @@ from superset.databases.commands.exceptions import DatabaseNotFoundError
from superset.databases.dao import DatabaseDAO
from superset.commands.export import ExportModelsCommand
from superset.models.core import Database
from superset.utils.dict_import_export import IMPORT_EXPORT_VERSION
from superset.utils.dict_import_export import EXPORT_VERSION
logger = logging.getLogger(__name__)
@@ -56,7 +56,7 @@ class ExportDatabasesCommand(ExportModelsCommand):
except json.decoder.JSONDecodeError:
logger.info("Unable to decode `extra` field: %s", payload["extra"])
payload["version"] = IMPORT_EXPORT_VERSION
payload["version"] = EXPORT_VERSION
file_content = yaml.safe_dump(payload, sort_keys=False)
yield file_name, file_content
@@ -71,7 +71,7 @@ class ExportDatabasesCommand(ExportModelsCommand):
include_defaults=True,
export_uuids=True,
)
payload["version"] = IMPORT_EXPORT_VERSION
payload["version"] = EXPORT_VERSION
payload["database_uuid"] = str(model.uuid)
file_content = yaml.safe_dump(payload, sort_keys=False)