zhaoyongjie commented on code in PR #20780:
URL: https://github.com/apache/superset/pull/20780#discussion_r925265473


##########
superset/utils/database.py:
##########
@@ -39,10 +39,7 @@ def get_or_create_db(
     from superset.models import core as models
 
     database = (
-        db.session.query(models.Database)
-        .filter_by(database_name=database_name)
-        .autoflush(False)
-        .first()
+        
db.session.query(models.Database).filter_by(database_name=database_name).first()

Review Comment:
   Although the Select can also be placed in a transaction, it relies on the 
subsequent commit(), which is not useful.



-- 
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-unsubscr...@superset.apache.org

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


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

Reply via email to