diff --git a/geokey/projects/views.py b/geokey/projects/views.py index 64013750..0486beeb 100644 --- a/geokey/projects/views.py +++ b/geokey/projects/views.py @@ -379,7 +379,8 @@ def post(self, request, project_id): status=status.HTTP_400_BAD_REQUEST ) - serializer = UserSerializer(project.admins.all(), many=True) + refreshed_admins = Project.objects.get(pk=project_id).admins.all() + serializer = UserSerializer(refreshed_admins, many=True) return Response( {'users': serializer.data}, status=status.HTTP_201_CREATED