betodealmeida commented on code in PR #34993:
URL: https://github.com/apache/superset/pull/34993#discussion_r2319855613


##########
superset/commands/dataset/update.py:
##########
@@ -257,6 +265,16 @@ def validate_folders(  # noqa: C901
         *[column.uuid for column in columns],
     }
 
+    # Add UUIDs from new metrics and columns in the payload
+    if new_metrics:
+        existing.update(
+            metric.get("uuid") for metric in new_metrics if metric.get("uuid")
+        )
+    if new_columns:
+        existing.update(
+            column.get("uuid") for column in new_columns if column.get("uuid")
+        )

Review Comment:
   Oh, man, I completely forgot how this API works. You're right, if we're 
passing metrics or columns then the existing ones will be deleted. I'll update 
this with your fix, thanks! 🌮 



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