villebro commented on code in PR #29286:
URL: https://github.com/apache/superset/pull/29286#discussion_r1645008173


##########
superset/commands/dashboard/permalink/create.py:
##########
@@ -62,6 +63,7 @@ def run(self) -> str:
                 codec=self.codec,
             ).run()
             assert key.id  # for type checks
+            db.session.commit()

Review Comment:
   While this has previously been considered an antipattern (=having `commit: 
bool` flag in these types of methods or similar), I'm personally also kind of 
leaning in that direction. This would make it possible to use all existing 
commands both as full units of work, or as part of a bigger chain, with minimal 
code duplication. Thoughts @john-bodley ? Also pinging @michael-s-molina as 
you've worked on these components in the past.



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