Skip to content

Commit

Permalink
fix: exception when saving dash (#13300)
Browse files Browse the repository at this point in the history
* fix: project None value

* fix: pre-commit
  • Loading branch information
amitmiran137 authored Feb 24, 2021
1 parent 0a00153 commit 29d6420
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 @@ -1178,7 +1178,10 @@ def save_dash( # pylint: disable=no-self-use
# the dashboard was open. it was use to avoid mid-air collision.
remote_last_modified_time = data.get("last_modified_time")
current_last_modified_time = dash.changed_on.replace(microsecond=0).timestamp()
if remote_last_modified_time < current_last_modified_time:
if (
remote_last_modified_time
and remote_last_modified_time < current_last_modified_time
):
return json_error_response(
__(
"This dashboard was changed recently. "
Expand Down

0 comments on commit 29d6420

Please sign in to comment.