dpgaspar commented on a change in pull request #10146:
URL:
https://github.com/apache/incubator-superset/pull/10146#discussion_r445479954
##########
File path: superset/security/manager.py
##########
@@ -389,15 +389,11 @@ def get_public_role(self) -> Optional[Any]: #
Optional[self.role_model]
if not conf.get("PUBLIC_ROLE_LIKE_GAMMA", False):
return None
- from superset import db
-
- return
db.session.query(self.role_model).filter_by(name="Public").first()
+ return
self.get_session.query(self.role_model).filter_by(name="Public").first()
Review comment:
`return
self.get_session.query(self.role_model).filter_by(name="Public").one_or_none()`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]