Fixed group update method. Fixed #2541.

This commit is contained in:
Norman Jäckel 2016-11-08 22:36:57 +01:00
parent db38e5e075
commit 2fae952edd
1 changed files with 8 additions and 0 deletions

View File

@ -128,3 +128,11 @@ class GroupSerializer(ModelSerializer):
'name',
'permissions',
)
def update(self, *args, **kwargs):
"""
Customized update method. We just refresh the instance from the
database because of an unknown bug in Django REST framework.
"""
instance = super().update(*args, **kwargs)
return Group.objects.get(pk=instance.pk)