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/09/02 18:47:23 UTC

[GitHub] [superset] eschutho commented on a change in pull request #14015: feat(filter-set): Add filterset resource

eschutho commented on a change in pull request #14015:
URL: https://github.com/apache/superset/pull/14015#discussion_r701338423



##########
File path: tests/integration_tests/dashboards/superset_factory_util.py
##########
@@ -145,11 +160,14 @@ def create_datasource_table_to_db(
 def create_datasource_table(
     name: Optional[str] = None,
     db_id: Optional[int] = None,
+    database: Optional[Database] = None,
     owners: Optional[List[User]] = None,
 ) -> SqlaTable:
-    name = name or random_str()
-    owners = owners or []
-    db_id = db_id or create_database_to_db(name=name + "_db").id
+    name = name if name is not None else random_str()
+    owners = owners if owners is not None else []

Review comment:
       I see a lot of these changes from an 'or 'statement to explicitly checking for None. It doesn't look like there are other falsy values that you would have, I'm curious what the advantage of this change is?




-- 
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