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 2018/05/18 00:37:33 UTC

[GitHub] john-bodley commented on a change in pull request #5019: fix missing datasource error message

john-bodley commented on a change in pull request #5019: fix missing datasource error message
URL: https://github.com/apache/incubator-superset/pull/5019#discussion_r189138119
 
 

 ##########
 File path: superset/views/core.py
 ##########
 @@ -1229,6 +1229,12 @@ def datasource_info(datasource_id, datasource_type, form_data):
         datasource = form_data.get('datasource', '')
         if '__' in datasource:
             datasource_id, datasource_type = datasource.split('__')
+            # The case where the datasource has been deleted
+            datasource_id = None if datasource_id == 'None' else datasource_id
+
+        if not datasource_id:
 
 Review comment:
   Why not simply, 
   ```
   if datasource_id == 'None':
       ...
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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