Merge pull request #2604 from normanjaeckel/FixGroupUpdate

Fixed group update method. Fixed #2541.
This commit is contained in:
Emanuel Schütze 2016-11-08 22:45:38 +01:00 committed by GitHub
commit fbc4344ab9

View File

@ -128,3 +128,11 @@ class GroupSerializer(ModelSerializer):
'name', 'name',
'permissions', '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)