Skip to content

Commit

Permalink
Merge pull request #1215 from bcgov/main
Browse files Browse the repository at this point in the history
Main <> Dev Synch Nov 11 2024 (Consults / Release 11.0)
  • Loading branch information
Aman-Hundal authored Nov 12, 2024
2 parents 9dfd13e + 79c8dae commit 4642102
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 21 deletions.
1 change: 0 additions & 1 deletion api/reviewer_api/schemas/finalpackage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 0 additions & 1 deletion api/reviewer_api/services/radactionservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
19 changes: 1 addition & 18 deletions computingservices/ZippingServices/services/zipperservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
)

0 comments on commit 4642102

Please sign in to comment.