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 2022/05/07 00:26:02 UTC

[GitHub] [superset] eschutho commented on a diff in pull request #19981: feat!: pass datasource_type and datasource_id to form_data

eschutho commented on code in PR #19981:
URL: https://github.com/apache/superset/pull/19981#discussion_r867275408


##########
superset/explore/form_data/commands/parameters.py:
##########
@@ -23,7 +23,8 @@
 @dataclass
 class CommandParameters:
     actor: User
-    dataset_id: int = 0
+    datasource_type: str = ""
+    datasource_id: int = 0

Review Comment:
   I'm not sure why we have datasource_id as required with a default to 0, so I kept with the same pattern and set datasource_type to an empty string. It almost seems like we should have two different classes here when a key exists and when it doesn't. 



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