From 8801a291af6833e3224fe9574564009df15654f5 Mon Sep 17 00:00:00 2001 From: pablohashescobar Date: Tue, 7 Feb 2023 14:05:09 +0530 Subject: [PATCH] fix: module issue updation and activity logging --- apiserver/plane/api/views/module.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apiserver/plane/api/views/module.py b/apiserver/plane/api/views/module.py index 2772d0d6a..80504d180 100644 --- a/apiserver/plane/api/views/module.py +++ b/apiserver/plane/api/views/module.py @@ -165,10 +165,10 @@ class ModuleIssueViewSet(BaseViewSet): ] if len(module_issue): - if module_issue[0].cycle_id != module_id: + if module_issue[0].module_id != module_id: update_module_issue_activity.append( { - "old_module_id": str(module_issue[0].cycle_id), + "old_module_id": str(module_issue[0].module_id), "new_module_id": str(module_id), "issue_id": str(module_issue[0].issue_id), } @@ -179,7 +179,7 @@ class ModuleIssueViewSet(BaseViewSet): record_to_create.append( ModuleIssue( module=module, - issue_id=issue, + issue=issue, project_id=project_id, workspace=module.workspace, created_by=request.user, @@ -203,14 +203,14 @@ class ModuleIssueViewSet(BaseViewSet): issue_activity.delay( { "type": "issue.activity", - "requested_data": json.dumps({"cycles_list": issues}), + "requested_data": json.dumps({"modules_list": issues}), "actor_id": str(self.request.user.id), "issue_id": str(self.kwargs.get("pk", None)), "project_id": str(self.kwargs.get("project_id", None)), "current_instance": json.dumps( { - "updated_cycle_issues": update_module_issue_activity, - "created_cycle_issues": serializers.serialize( + "updated_module_issues": update_module_issue_activity, + "created_module_issues": serializers.serialize( "json", record_to_create ), }