Skip to content

Commit

Permalink
Fix permissions bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Apophenia committed Jan 15, 2025
1 parent 54cc558 commit 8040acb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions services/sources/publisher_backlist_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,16 +176,16 @@ 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}'

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:
Expand Down

0 comments on commit 8040acb

Please sign in to comment.