Skip to content

Conversation

@vincbeck
Copy link
Contributor

If you run airflow sync-perm in main you'll get the error:

[2025-03-11T14:37:55.804+0000] {init_appbuilder.py:551} ERROR - 'NoneType' object has no attribute 'permissions'
Traceback (most recent call last):
  File "/opt/airflow/providers/fab/src/airflow/providers/fab/www/extensions/init_appbuilder.py", line 549, in _add_permission
    self.sm.add_permissions_view(baseview.base_permissions, baseview.class_permission_name)
  File "/opt/airflow/providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py", line 1120, in add_permissions_view
    self.add_permission_to_role(admin_role, action)
  File "/opt/airflow/providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py", line 1704, in add_permission_to_role
    if permission and permission not in role.permissions:
AttributeError: 'NoneType' object has no attribute 'permissions'

This PR fixes this issue.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@vincbeck vincbeck force-pushed the vincbeck/sync_perm branch from 8ebf97b to f7381d1 Compare March 12, 2025 17:56
@vincbeck vincbeck requested a review from jedcunningham March 12, 2025 19:00
@vincbeck vincbeck merged commit 1e70452 into apache:main Mar 12, 2025
60 checks passed
@vincbeck vincbeck deleted the vincbeck/sync_perm branch March 12, 2025 19:04
nailo2c pushed a commit to nailo2c/airflow that referenced this pull request Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants