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/07/27 23:06:14 UTC

[GitHub] [superset] eric-briscoe commented on a diff in pull request #20880: fix: Save dataset + chart when Chart source is Query

eric-briscoe commented on code in PR #20880:
URL: https://github.com/apache/superset/pull/20880#discussion_r931648936


##########
superset/views/core.py:
##########
@@ -2093,8 +2093,20 @@ def sqllab_viz(self) -> FlaskResponse:  # pylint: disable=no-self-use
             .filter_by(database_id=database_id, table_name=table_name)
             .one_or_none()
         )
-        if not table:
-            table = SqlaTable(table_name=table_name, owners=[g.user])
+
+        if table:
+            return json_errors_response(
+                [
+                    SupersetError(
+                        message=f"Dataset [{table_name}] already exist",

Review Comment:
   message=f"Dataset [{table_name}] already exist" <--- should this read 
   message=f"Dataset [{table_name}] already exists" <--- exists instead of exist



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