From 29d6420ecc2187db951f08dd47289277a11f4db5 Mon Sep 17 00:00:00 2001 From: Amit Miran <47772523+amitmiran137@users.noreply.github.com> Date: Wed, 24 Feb 2021 12:08:28 +0200 Subject: [PATCH] fix: exception when saving dash (#13300) * fix: project None value * fix: pre-commit --- superset/views/core.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/superset/views/core.py b/superset/views/core.py index 155555e4a..2c390c406 100755 --- a/superset/views/core.py +++ b/superset/views/core.py @@ -1178,7 +1178,10 @@ class Superset(BaseSupersetView): # pylint: disable=too-many-public-methods # 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. "