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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org