diff --git a/apps/authorization/api/v1/serializers.py b/apps/authorization/api/v1/serializers.py index 7a162d1..ee1dd23 100644 --- a/apps/authorization/api/v1/serializers.py +++ b/apps/authorization/api/v1/serializers.py @@ -74,14 +74,12 @@ class PermissionSerializer(serializers.ModelSerializer): grouped[page_name].add(permission.name) modifier_states[page_name].add(permission.modify_state) - structure = [] - for page, access in grouped.items(): - if not any(modifier_states[page]): - structure.append({ - 'page_name': page, - 'page_access': sorted(list(access)) - }) - + structure = [ + { + 'page_name': page, + 'page_access': sorted(list(access)) + } for page, access in grouped.items() + ] return structure diff --git a/logs/django_requests.log b/logs/django_requests.log index c790ed8..a37f0f7 100644 --- a/logs/django_requests.log +++ b/logs/django_requests.log @@ -1049,3 +1049,5 @@ TypeError: string indices must be integers, not 'str' [2025-11-03 16:36:44,782] INFO django.server | IP: - | Path: - | "GET /auth/api/v1/user-relations/?role= HTTP/1.1" 200 14315 [2025-11-03 16:43:51,156] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\authorization\api\v1\serializers.py changed, reloading. [2025-11-03 16:43:57,776] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader +[2025-11-03 16:50:08,668] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\authorization\api\v1\serializers.py changed, reloading. +[2025-11-03 16:50:10,599] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader