Skip to content

Commit

Permalink
fix missing datasource error message
Browse files Browse the repository at this point in the history
  • Loading branch information
timifasubaa committed May 16, 2018
1 parent b839608 commit cf374ef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

datasource_id = int(datasource_id) if datasource_id else None
return datasource_id, datasource_type

@log_this
Expand Down

0 comments on commit cf374ef

Please sign in to comment.