From 9046bff659ac885473af4cf5228040f51db4501f Mon Sep 17 00:00:00 2001 From: pablohashescobar Date: Thu, 22 Dec 2022 16:16:07 +0530 Subject: [PATCH] fix: module update serializer --- apiserver/plane/api/serializers/module.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apiserver/plane/api/serializers/module.py b/apiserver/plane/api/serializers/module.py index c324f0665..662c357cd 100644 --- a/apiserver/plane/api/serializers/module.py +++ b/apiserver/plane/api/serializers/module.py @@ -60,9 +60,8 @@ class ModuleWriteSerializer(BaseSerializer): members = validated_data.pop("members_list", None) - project = self.context["project"] - module = Module.objects.create(**validated_data, project=project) + module = Module.objects.create(**validated_data, project=instance.project) if members is not None: ModuleMember.objects.bulk_create( @@ -70,8 +69,8 @@ class ModuleWriteSerializer(BaseSerializer): ModuleMember( module=module, member=member, - project=project, - workspace=project.workspace, + project=instance.project, + workspace=instance.project.workspace, created_by=module.created_by, updated_by=module.updated_by, )