You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "michael-s-molina (via GitHub)" <gi...@apache.org> on 2025/06/02 11:20:09 UTC
Re: [PR] fix: Update dataset's last modified date from column/metric update [superset]
michael-s-molina commented on code in PR #33626:
URL: https://github.com/apache/superset/pull/33626#discussion_r2120839180
##########
superset/daos/dataset.py:
##########
@@ -184,15 +185,24 @@ def update(
"""
if item and attributes:
+ force_update: bool = False
if "columns" in attributes:
cls.update_columns(
item,
attributes.pop("columns"),
override_columns=bool(attributes.get("override_columns")),
)
+ force_update = True
if "metrics" in attributes:
cls.update_metrics(item, attributes.pop("metrics"))
+ force_update = True
+
+ # columns and metrics are stored in separate tables so if they change we
+ # force an update to the dataset too to ensure the last_updated_timestamp
+ # is updated (it's possible no other dataset attributes are changed).
+ if force_update:
Review Comment:
Exactly @betodealmeida!
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org