forked from github/plane
fix: module update serializer
This commit is contained in:
parent
b21a3326f2
commit
9046bff659
@ -60,9 +60,8 @@ class ModuleWriteSerializer(BaseSerializer):
|
|||||||
|
|
||||||
members = validated_data.pop("members_list", None)
|
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:
|
if members is not None:
|
||||||
ModuleMember.objects.bulk_create(
|
ModuleMember.objects.bulk_create(
|
||||||
@ -70,8 +69,8 @@ class ModuleWriteSerializer(BaseSerializer):
|
|||||||
ModuleMember(
|
ModuleMember(
|
||||||
module=module,
|
module=module,
|
||||||
member=member,
|
member=member,
|
||||||
project=project,
|
project=instance.project,
|
||||||
workspace=project.workspace,
|
workspace=instance.project.workspace,
|
||||||
created_by=module.created_by,
|
created_by=module.created_by,
|
||||||
updated_by=module.updated_by,
|
updated_by=module.updated_by,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user