ktmud commented on a change in pull request #11614:
URL:
https://github.com/apache/incubator-superset/pull/11614#discussion_r520100504
##########
File path: superset/views/core.py
##########
@@ -1085,8 +1085,14 @@ def save_dash( # pylint: disable=no-self-use
DashboardDAO.set_dash_metadata(dash, data)
session.merge(dash)
session.commit()
+
+ # get updated changed_on
+ dash = session.query(Dashboard).get(dashboard_id)
+ last_modified_time = dash.changed_on.replace(microsecond=0).timestamp()
session.close()
- return json_success(json.dumps({"status": "SUCCESS"}))
+ return json_success(
+ json.dumps({"status": "SUCCESS", "last_modified_time":
last_modified_time,})
Review comment:
Can we rename `last_modified_time` everywhere to `changed_on` if it's
not too big of a change?
Having some consistency is nice.
##########
File path: superset/views/core.py
##########
@@ -1085,8 +1085,14 @@ def save_dash( # pylint: disable=no-self-use
DashboardDAO.set_dash_metadata(dash, data)
session.merge(dash)
session.commit()
+
+ # get updated changed_on
+ dash = session.query(Dashboard).get(dashboard_id)
+ last_modified_time = dash.changed_on.replace(microsecond=0).timestamp()
Review comment:
Nit: `.replace(microsecond=0)` is probably not needed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]