role childs service add to BaseViewSet

This commit is contained in:
2025-10-28 09:51:30 +03:30
parent 714e9abc1c
commit f7df23abe3
2 changed files with 20 additions and 1 deletions

View File

@@ -11,5 +11,5 @@ def get_all_role_child(role: Role = None) -> typing.Any:
children = role.child.all()
for child in children:
descendants.append(child)
descendants.extend(get_all_org_child(child))
descendants.extend(get_all_role_child(child))
return descendants

View File

@@ -284,3 +284,22 @@ django.core.exceptions.FieldError: Unsupported lookup 'name' for ForeignKey or j
[2025-10-28 09:32:44,094] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
[2025-10-28 09:38:33,191] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\core\api.py changed, reloading.
[2025-10-28 09:38:36,690] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
[2025-10-28 09:44:31,623] WARNING django.request | IP: 127.0.0.1 | Path: /auth/api/v1/role/ | Unauthorized: /auth/api/v1/role/
[2025-10-28 09:44:31,623] WARNING django.server | IP: - | Path: - | "GET /auth/api/v1/role/ HTTP/1.1" 401 191
[2025-10-28 09:45:03,694] INFO django.server | IP: - | Path: - | "GET /auth/api/v1/role/ HTTP/1.1" 200 9711
[2025-10-28 09:45:22,623] INFO django.server | IP: - | Path: - | "POST /captcha/ HTTP/1.1" 200 706
[2025-10-28 09:45:57,097] INFO django.server | IP: - | Path: - | "POST /auth/api/v1/login/ HTTP/1.1" 200 702
[2025-10-28 09:46:13,214] INFO django.server | IP: - | Path: - | "GET /auth/api/v1/role/ HTTP/1.1" 200 67
[2025-10-28 09:46:21,948] INFO django.server | IP: - | Path: - | "GET /auth/api/v1/role/ HTTP/1.1" 200 67
[2025-10-28 09:46:36,078] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\core\api.py changed, reloading.
[2025-10-28 09:46:39,446] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
[2025-10-28 09:46:44,817] INFO django.server | IP: - | Path: - | "GET /auth/api/v1/role/ HTTP/1.1" 200 67
[2025-10-28 09:46:55,548] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\core\api.py changed, reloading.
[2025-10-28 09:46:58,433] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
[2025-10-28 09:47:02,294] INFO django.server | IP: - | Path: - | "GET /auth/api/v1/role/ HTTP/1.1" 200 67
[2025-10-28 09:47:19,757] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\core\api.py changed, reloading.
[2025-10-28 09:47:23,096] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
[2025-10-28 09:47:27,211] INFO django.server | IP: - | Path: - | "GET /auth/api/v1/role/ HTTP/1.1" 200 67
[2025-10-28 09:48:08,454] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\core\api.py changed, reloading.
[2025-10-28 09:48:11,301] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
[2025-10-28 09:51:26,296] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\authorization\services\role_child.py changed, reloading.