Skip to content

Commit

Permalink
raise exception early
Browse files Browse the repository at this point in the history
  • Loading branch information
timifasubaa committed May 18, 2018
1 parent cf374ef commit f52f7aa
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 @@ -1232,7 +1232,10 @@ def datasource_info(datasource_id, datasource_type, form_data):
# 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
if not datasource_id:
raise Exception(
'The data source associated with this chart no longer exists')
datasource_id = int(datasource_id)
return datasource_id, datasource_type

@log_this
Expand Down

0 comments on commit f52f7aa

Please sign in to comment.