rusackas commented on code in PR #42803:
URL: https://github.com/apache/superset/pull/42803#discussion_r3740619364


##########
superset/daos/dataset.py:
##########
@@ -630,7 +630,7 @@ def find_dataset_metric(cls, dataset_id: int, metric_id: 
int) -> SqlMetric | Non
         dataset = DatasetDAO.find_by_id(dataset_id)
         if not dataset:
             return None
-        return db.session.query(SqlMetric).get(metric_id)
+        return db.session.get(SqlMetric, metric_id)

Review Comment:
   This is just the mechanical `Query.get()` -> `session.get()` swap for 2.0, 
same behavior as before. The missing `table_id == dataset_id` filter predates 
this PR and is unrelated to the SQLAlchemy bump, so it's out of scope here.



-- 
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]

Reply via email to