Merge pull request #4768 from normanjaeckel/Review

Added detail to set permission response.
This commit is contained in:
Emanuel Schütze 2019-06-05 20:01:42 +02:00 committed by GitHub
commit 1e8560c9a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -386,7 +386,7 @@ class GroupViewSet(ModelViewSet):
@transaction.atomic
def set_permission(self, request, *args, **kwargs):
"""
Send {perm: <permissionstring> set: <True/False>} to set or
Send {perm: <permissionstring>, set: <True/False>} to set or
remove the permission from a group
"""
perm = request.data.get("perm")
@ -417,7 +417,9 @@ class GroupViewSet(ModelViewSet):
self.inform_permission_change(group, permission)
inform_changed_data(group)
return Response()
return Response(
{"detail": f"Permissions of group {group.pk} successfully changed."}
)
def inform_permission_change(
self,