You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/08/03 02:21:20 UTC

[GitHub] [superset] john-bodley commented on a change in pull request #16041: fix: set correct schema on config import

john-bodley commented on a change in pull request #16041:
URL: https://github.com/apache/superset/pull/16041#discussion_r681385461



##########
File path: superset/commands/importers/v1/examples.py
##########
@@ -103,6 +104,14 @@ def _import(
                 else:
                     config["database_id"] = database_ids[config["database_uuid"]]
 
+                # set schema
+                if config["schema"] is None:
+                    url = make_url(
+                        conf.get("SQLALCHEMY_EXAMPLES_URI")
+                        or conf.get("SQLALCHEMY_DATABASE_URI")

Review comment:
       ```suggestion
                           or conf["SQLALCHEMY_DATABASE_URI"]
   ```
   
   By construction this is guaranteed to exist.
   
   Also @betodealmeida per [here](https://github.com/apache/superset/blob/master/superset/__init__.py#L36-L39) the `conf` field is deemed to be legacy, i.e., we likely should be using  `current_app.config` instead. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org