From 2b8a75d1e1043f0c028192dd60073a5d8253fe49 Mon Sep 17 00:00:00 2001 From: Aparna Date: Wed, 16 Oct 2024 08:51:42 -0700 Subject: [PATCH 1/4] FOIMOD-3073-Fees - Remaining Balance Check Harms download & Redline notification fixes --- .../models/redlineresponsenotificationmessage.py | 2 +- .../ZippingServices/models/zipperproducermessage.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/computingservices/ZippingServices/models/redlineresponsenotificationmessage.py b/computingservices/ZippingServices/models/redlineresponsenotificationmessage.py index ccb851933..cc562164f 100644 --- a/computingservices/ZippingServices/models/redlineresponsenotificationmessage.py +++ b/computingservices/ZippingServices/models/redlineresponsenotificationmessage.py @@ -1,5 +1,5 @@ class redlineresponsenotificationmessage(object): - def __init__(self, ministryrequestid, serviceid, errorflag, createdby,feeoverridereason) -> None: + def __init__(self, ministryrequestid, serviceid, errorflag, createdby,feeoverridereason="") -> None: self.ministryrequestid = ministryrequestid self.serviceid = serviceid self.errorflag = errorflag diff --git a/computingservices/ZippingServices/models/zipperproducermessage.py b/computingservices/ZippingServices/models/zipperproducermessage.py index 73b4b795c..41b175753 100644 --- a/computingservices/ZippingServices/models/zipperproducermessage.py +++ b/computingservices/ZippingServices/models/zipperproducermessage.py @@ -1,5 +1,5 @@ class zipperproducermessage(object): - def __init__(self,jobid,requestid,category,requestnumber,bcgovcode,createdby,ministryrequestid,filestozip,finaloutput,attributes,feeoverridereason,summarydocuments=None,redactionlayerid=None,foldername=None) -> None: + def __init__(self,jobid,requestid,category,requestnumber,bcgovcode,createdby,ministryrequestid,filestozip,finaloutput,attributes,feeoverridereason=None,summarydocuments=None,redactionlayerid=None,foldername=None) -> None: self.jobid = jobid self.requestid = requestid self.category=category From 2db0d470a1519ad96d94e3fcdb6758135865c00b Mon Sep 17 00:00:00 2001 From: Aman-Hundal Date: Fri, 8 Nov 2024 12:58:15 -0800 Subject: [PATCH 2/4] faulty merge fixes from test-marshal to dev/main --- .../message/schemas/redactionsummary.py | 1 - .../ZippingServices/services/zipperservice.py | 19 +------------------ 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/computingservices/DocumentServices/rstreamio/message/schemas/redactionsummary.py b/computingservices/DocumentServices/rstreamio/message/schemas/redactionsummary.py index b3a6d67f5..71877038a 100644 --- a/computingservices/DocumentServices/rstreamio/message/schemas/redactionsummary.py +++ b/computingservices/DocumentServices/rstreamio/message/schemas/redactionsummary.py @@ -43,7 +43,6 @@ def __init__(self, jobid, requestid, ministryrequestid, category, requestnumber, self.attributes = attributes self.summarydocuments = summarydocuments self.redactionlayerid = redactionlayerid - self.feeoverridereason = feeoverridereason self.requesttype = requesttype self.feeoverridereason = feeoverridereason diff --git a/computingservices/ZippingServices/services/zipperservice.py b/computingservices/ZippingServices/services/zipperservice.py index 312ad7562..e1f2ed01d 100644 --- a/computingservices/ZippingServices/services/zipperservice.py +++ b/computingservices/ZippingServices/services/zipperservice.py @@ -172,21 +172,4 @@ def __getzipfilepath(foldername, filename): foldername.capitalize() + "/" + filename + ".zip" if foldername is not None else filename + ".zip" - ) - - -def __removesensitivecontent(documentbytes): - # clear metadata - reader2 = PyPDF2.PdfReader(BytesIO(documentbytes)) - # Check if metadata exists. - if reader2.metadata is not None: - # Create a new PDF file without metadata. - writer = PyPDF2.PdfWriter() - # Copy pages from the original PDF to the new PDF. - for page_num in range(len(reader2.pages)): - page = reader2.pages[page_num] - writer.add_page(page) - #writer.remove_links() # to remove comments. - buffer = BytesIO() - writer.write(buffer) - return buffer.getvalue() \ No newline at end of file + ) \ No newline at end of file From fe36b2a11d412742881528faee19783cfbc72981 Mon Sep 17 00:00:00 2001 From: Aman-Hundal Date: Fri, 8 Nov 2024 15:27:27 -0800 Subject: [PATCH 3/4] removal of bad merge code --- api/reviewer_api/schemas/finalpackage.py | 1 - api/reviewer_api/services/radactionservice.py | 1 - 2 files changed, 2 deletions(-) diff --git a/api/reviewer_api/schemas/finalpackage.py b/api/reviewer_api/schemas/finalpackage.py index bfb334589..cf74b9e85 100644 --- a/api/reviewer_api/schemas/finalpackage.py +++ b/api/reviewer_api/schemas/finalpackage.py @@ -32,7 +32,6 @@ class FinalPackageSchema(Schema): ) summarydocuments = fields.Nested(SummarySchema, allow_none=True) redactionlayerid = fields.Int(data_key="redactionlayerid", allow_none=False) - pdfstitchjobattributes = fields.Nested(FeeOverrideSchema, allow_none=True, many=False) requesttype = fields.Str(data_key="requesttype", allow_none=False) pdfstitchjobattributes = fields.Nested(FeeOverrideSchema, allow_none=True, many=False) diff --git a/api/reviewer_api/services/radactionservice.py b/api/reviewer_api/services/radactionservice.py index cb064ad48..47fe31538 100644 --- a/api/reviewer_api/services/radactionservice.py +++ b/api/reviewer_api/services/radactionservice.py @@ -159,7 +159,6 @@ def __preparemessageforsummaryservice(self, messageschema, userinfo, job): "attributes": to_json(messageschema["attributes"]), "summarydocuments": json.dumps(messageschema["summarydocuments"]), "redactionlayerid": json.dumps(messageschema["redactionlayerid"]), - "feeoverridereason":feeoverridereason, "requesttype": messageschema["requesttype"], "feeoverridereason":feeoverridereason } From 3d129d9532737e76a215bb71686a26b311bd11d5 Mon Sep 17 00:00:00 2001 From: nkan-aot2 <156717133+nkan-aot2@users.noreply.github.com> Date: Wed, 13 Nov 2024 15:49:20 -0800 Subject: [PATCH 4/4] fix cfd personal not loading in prod stemming from merge issue --- web/src/components/FOI/Home/Home.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/components/FOI/Home/Home.js b/web/src/components/FOI/Home/Home.js index 233fb64dc..d13ec32a6 100644 --- a/web/src/components/FOI/Home/Home.js +++ b/web/src/components/FOI/Home/Home.js @@ -109,7 +109,7 @@ function Home() { }); let doclist = []; - let requestInfo = _requestInfo.requestinfo; + let requestInfo = _requestInfo; getFOIS3DocumentPreSignedUrls( documentObjs, (newDocumentObjs) => {