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


##########
superset/commands/dashboard/update.py:
##########
@@ -130,6 +131,19 @@ def validate(self) -> None:
         except ValidationError as ex:
             exceptions.append(ex)
 
+        # A dashboard PUT resends the full object on every save, so only
+        # validate css when it's actually changing -- otherwise a dashboard
+        # whose existing css predates this check (or was imported without
+        # going through it) becomes uneditable for unrelated changes like a
+        # rename or a chart move.
+        if "css" in self._properties:
+            new_css = self._properties["css"]

Review Comment:
   Same as codeant's thread above: `self._model` is already read at the top of 
this transaction, right before the write, so there isn't a later value to 
condition on without an explicit row lock. Felt like more than this PR's scope 
to add 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