Skip to content

Commit

Permalink
Merge pull request #289 from MITLibraries/bug-modify-failed-record-lo…
Browse files Browse the repository at this point in the history
…gging

Handle missing source record for logging
  • Loading branch information
ghukill committed Apr 24, 2024
2 parents 152069f + 4e390df commit 85b778d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion harvester/harvest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,12 @@ def get_source_records(self) -> Iterator[Record]:
message = f"harvest type: '{self.harvest_type}' not recognized"
raise ValueError(message)
for record in records:
event = (
record.source_record.event if record.source_record is not None else None
)
message = (
f"Record {record.identifier}: retrieved source record, event '"
f"{record.source_record.event}'"
f"{event}'"
)
logger.debug(message)
self.processed_records_count += 1
Expand Down

0 comments on commit 85b778d

Please sign in to comment.