fix - cant delete admin role

This commit is contained in:
2025-10-28 13:51:05 +03:30
parent a333a5e5a8
commit 7ffaff2c11
4 changed files with 24 additions and 2 deletions

View File

@@ -349,7 +349,7 @@ class OrganizationViewSet(BaseViewSet, SoftDeleteMixin, ModelViewSet, DynamicSea
page = self.paginate_queryset(queryset) # paginate queryset
if page is not None:
if page is not None: # noqa
serializer = self.serializer_class(page, many=True)
return self.get_paginated_response(serializer.data)
@@ -396,7 +396,7 @@ class GeneralOTPViewSet(SoftDeleteMixin, ModelViewSet):
role__role_name='Management').first().user.mobile
return user_mobile
if data['get_mobile_type'] == 'general':
if data['get_mobile_type'] == 'general': # noqa
return data['mobile']
@action(