graceguo-supercat commented on a change in pull request #11614:
URL:
https://github.com/apache/incubator-superset/pull/11614#discussion_r520121851
##########
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:
changed_on is a column name in Dashboards table, its type is `DATETIME`.
I prefer to use utc timestamp (use it like version id) so that ignore local
time etc (maybe different setup in each company).
----------------------------------------------------------------
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]