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 2019/11/15 07:24:32 UTC

[GitHub] [incubator-superset] mistercrunch commented on a change in pull request #8511: Fix for BigQuery connection checks and CSV uploads

mistercrunch commented on a change in pull request #8511: Fix for BigQuery connection checks and CSV uploads
URL: https://github.com/apache/incubator-superset/pull/8511#discussion_r346689548
 
 

 ##########
 File path: superset/db_engine_specs/base.py
 ##########
 @@ -403,6 +401,8 @@ def _allowed_file(filename: str) -> bool:
                 extension is not None and extension[1:] in config["ALLOWED_EXTENSIONS"]
             )
 
+        database = db.session.query(Database).filter_by(id=form.con.data.id).one()
 
 Review comment:
   The caller has the database object handy, maybe it should just pass it over? The interface is a bit funky here (receiving the `form` object) but preventing from re-fetching the database object from the database is positive and prevents the need for the late import that works around the circular imports...

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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