This is an automated email from the ASF dual-hosted git repository.
vincbeck pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new f62909858c1 fix(providers/fab): pass role name string to delete_role
instead of Role object (#63337)
f62909858c1 is described below
commit f62909858c176df33741f7912b876ed658fbf016
Author: Yoann <[email protected]>
AuthorDate: Wed Mar 11 06:57:23 2026 -0700
fix(providers/fab): pass role name string to delete_role instead of Role
object (#63337)
---
.../airflow/providers/fab/auth_manager/api_fastapi/services/roles.py | 2 +-
.../fab/tests/unit/fab/auth_manager/api_fastapi/services/test_roles.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git
a/providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/services/roles.py
b/providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/services/roles.py
index 366a25cce6d..44f82caa95b 100644
---
a/providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/services/roles.py
+++
b/providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/services/roles.py
@@ -112,7 +112,7 @@ class FABAuthManagerRoles:
status_code=status.HTTP_404_NOT_FOUND,
detail=f"Role with name {name!r} does not exist.",
)
- security_manager.delete_role(existing)
+ security_manager.delete_role(existing.name)
@classmethod
def get_role(cls, name: str) -> RoleResponse:
diff --git
a/providers/fab/tests/unit/fab/auth_manager/api_fastapi/services/test_roles.py
b/providers/fab/tests/unit/fab/auth_manager/api_fastapi/services/test_roles.py
index b69534ce2d4..1dec2954b60 100644
---
a/providers/fab/tests/unit/fab/auth_manager/api_fastapi/services/test_roles.py
+++
b/providers/fab/tests/unit/fab/auth_manager/api_fastapi/services/test_roles.py
@@ -227,7 +227,7 @@ class TestRolesService:
FABAuthManagerRoles.delete_role(name="roleA")
- security_manager.delete_role.assert_called_once()
+ security_manager.delete_role.assert_called_once_with("roleA")
def test_delete_role_not_found(self, get_fab_auth_manager,
fab_auth_manager, security_manager):
security_manager.find_role.return_value = None