betodealmeida commented on code in PR #33626:
URL: https://github.com/apache/superset/pull/33626#discussion_r2122102129
##########
superset/daos/dataset.py:
##########
@@ -184,15 +184,21 @@ 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
+
+ if force_update:
+ attributes["changed_on"] = datetime.now()
Review Comment:
I think we want `datetime.utcnow` here. I'm in EST:
```python
>>> print(datetime.now(), datetime.utcnow())
2025-06-02 16:29:53.651504 2025-06-02 20:29:53.652092
>>>
```
```suggestion
attributes["changed_on"] = datetime.utcnow()
```
Although I just checked the codebase and it seems like we have some columns
where the default is `datetime.now()`. :(
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]