Vitor-Avila commented on code in PR #32658:
URL: https://github.com/apache/superset/pull/32658#discussion_r1994331617
##########
superset/commands/database/sync_permissions.py:
##########
@@ -249,11 +249,11 @@ def _rename_database_in_permissions(
self, catalog: str | None, schemas: Iterable[str]
) -> None:
# rename existing catalog permission
+ new_catalog_perm_name = security_manager.get_catalog_perm(
+ self.db_connection.name,
+ catalog,
Review Comment:
We could make this:
``` python
new_catalog_perm_name = None
if catalog:
new_catalog_perm_name = security_manager.get_catalog_perm(
self.db_connection.name,
catalog,
)
```
But since `get_catalog_perm()` gracefully handles that, I thought it makes
more sense to keep it this way.
--
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]