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


##########
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:
   > We'll achieve that with nested transactions using 
[being_nested](https://docs.sqlalchemy.org/en/20/orm/session_api.html#sqlalchemy.orm.Session.begin_nested).
 Check https://github.com/apache/superset/pull/24969 for reference.
   
   @michael-s-molina I read up on the docs I could find, and I agree, this 
should be an elegant solution to this dual use case.
   
   @john-bodley it would be great if you could add a description to #24969 so 
we can start reviewing/testing it. I'm keen on getting this important refactor 
in, as it will have a profound impact on the general quality and perormance of 
the backend.



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