diff --git a/request-management-api/request_api/resources/applicantcorrespondence.py b/request-management-api/request_api/resources/applicantcorrespondence.py index 5cacfcd5f..08d23dff9 100644 --- a/request-management-api/request_api/resources/applicantcorrespondence.py +++ b/request-management-api/request_api/resources/applicantcorrespondence.py @@ -92,7 +92,7 @@ def post(requestid, ministryrequestid): requestjson = request.get_json() applicantcorrespondencelog = FOIApplicantCorrespondenceSchema().load(data=requestjson) rawrequestid = requestservice().getrawrequestidbyfoirequestid(requestid) - result = communicationwrapperservice().send_email(rawrequestid, ministryrequestid, applicantcorrespondencelog) + result = communicationwrapperservice().send_email(requestid, rawrequestid, ministryrequestid, applicantcorrespondencelog) return {'status': result.success, 'message': result.message, 'id': result.identifier}, 200 except BusinessException: return "Error happened while saving applicant correspondence log", 500 diff --git a/request-management-api/request_api/services/communicationwrapperservice.py b/request-management-api/request_api/services/communicationwrapperservice.py index 09bb1dc23..0b97a0497 100644 --- a/request-management-api/request_api/services/communicationwrapperservice.py +++ b/request-management-api/request_api/services/communicationwrapperservice.py @@ -18,10 +18,10 @@ class communicationwrapperservice: """ FOI communication wrapper service """ - def send_email(self, requestid, ministryrequestid, applicantcorrespondencelog): + def send_email(self, requestid, rawrequestid, ministryrequestid, applicantcorrespondencelog): # Save correspondence log based on request type if ministryrequestid == 'None' or ministryrequestid is None or ("israwrequest" in applicantcorrespondencelog and applicantcorrespondencelog["israwrequest"]) is True: - result = applicantcorrespondenceservice().saveapplicantcorrespondencelogforrawrequest(requestid, applicantcorrespondencelog, AuthHelper.getuserid()) + result = applicantcorrespondenceservice().saveapplicantcorrespondencelogforrawrequest(rawrequestid, applicantcorrespondencelog, AuthHelper.getuserid()) else: result = applicantcorrespondenceservice().saveapplicantcorrespondencelog(requestid, ministryrequestid, applicantcorrespondencelog, AuthHelper.getuserid())