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/16 23:26:57 UTC

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

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

 ##########
 File path: superset/views/core.py
 ##########
 @@ -1229,7 +1229,10 @@ def datasource_info(datasource_id, datasource_type, form_data):
         datasource = form_data.get('datasource', '')
         if '__' in datasource:
             datasource_id, datasource_type = datasource.split('__')
-        datasource_id = int(datasource_id)
+            # The case where the datasource has been deleted
+            datasource_id = None if datasource_id == 'None' else datasource_id
 
 Review comment:
   I don't understand how `datasource_id == 'None'` comes into being in the first place. Can we catch the issue upstream?

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