From 8040acb2508bca5143663d4ca6d561b8dd709f4d Mon Sep 17 00:00:00 2001 From: Lyndsey Jane Moulds <2042238+Apophenia@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:09:26 -0500 Subject: [PATCH] Fix permissions bug --- services/sources/publisher_backlist_service.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/sources/publisher_backlist_service.py b/services/sources/publisher_backlist_service.py index 70515ecc30..d7c87f6f60 100644 --- a/services/sources/publisher_backlist_service.py +++ b/services/sources/publisher_backlist_service.py @@ -176,7 +176,7 @@ def get_records( s3_response = self.s3_manager.putObjectInBucket(file.getvalue(), s3_path, bucket) if not s3_response.get('ResponseMetadata').get('HTTPStatusCode') == 200: - logger.error(f'Failed to retrieve upload file for {record_metadata.get("DRB_Record ID")} to S3') + logger.error(f'Failed to upload file for {record_metadata.get("DRB_Record ID")} to S3') continue s3_url = f'https://{bucket}.s3.amazonaws.com/{s3_path}' @@ -184,8 +184,8 @@ def get_records( publisher_backlist_record = PublisherBacklistMapping(record_metadata) publisher_backlist_record.applyMapping() - self.add_has_part_mapping(s3_url, publisher_backlist_record.record) - self.store_pdf_manifest(publisher_backlist_record.record, requires_login=record_permissions['requires_login']) + self.add_has_part_mapping(s3_url, publisher_backlist_record.record, record_permissions['is_downloadable'], record_permissions['requires_login']) + self.store_pdf_manifest(publisher_backlist_record.record, record_permissions['requires_login']) mapped_records.append(publisher_backlist_record) except Exception: