vincbeck commented on code in PR #37718:
URL: https://github.com/apache/airflow/pull/37718#discussion_r1503134215
##########
airflow/providers/fab/auth_manager/security_manager/override.py:
##########
@@ -728,7 +728,8 @@ def create_admin_standalone(self) -> tuple[str | None, str
| None]:
if not user_exists:
print(f"FlaskAppBuilder Authentication Manager: Creating
{user_name} user")
role = self.find_role("Admin")
- assert role is not None
+ if TYPE_CHECKING:
+ assert role is not None
Review Comment:
I guess it is totally possible that the role does not exist (if the user
removes for instance). I would just throw `AirflowException` in that case
--
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]