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


##########
tests/integration_tests/datasets/api_tests.py:
##########
@@ -123,6 +123,7 @@ def insert_dataset(
         if columns:
             table.columns = columns
         if metrics:
+            db.session.add_all(metrics)

Review Comment:
   Technically right, since `db.session.add(table)` two lines down cascades to 
`table.metrics` via save-update regardless of `cascade_backrefs`. It's a 
harmless no-op though, and matches the same belt-and-suspenders pattern #42222 
just added for `columns` in this same function, so leaving it for consistency 
between the two.



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