forked from github/plane
chore: make module create and list endpoint response structure simillar (#2524)
This commit is contained in:
parent
55b2927a17
commit
c8f98a9bc2
@ -149,6 +149,9 @@ class ModuleViewSet(BaseViewSet):
|
||||
|
||||
if serializer.is_valid():
|
||||
serializer.save()
|
||||
|
||||
module = Module.objects.get(pk=serializer.data["id"])
|
||||
serializer = ModuleSerializer(module)
|
||||
return Response(serializer.data, status=status.HTTP_201_CREATED)
|
||||
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user