Skip to content

Commit

Permalink
import: fix work access point
Browse files Browse the repository at this point in the history
* Fixes `_do_work_access_point_creator` date creation.

Co-Authored-by: Peter Weber <[email protected]>
  • Loading branch information
rerowep committed Apr 23, 2024
1 parent 27d2d31 commit 706dc34
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1724,9 +1724,9 @@ def _do_work_access_point_creator(marc21, key, value):
not_repetitive(bib_id, bib_id, key, value, 'b'))
if date := not_repetitive(bib_id, bib_id, key, value, 'd'):
date_parts = [d.strip().rstrip('.') for d in date.split('-')]
if date_parts[0]:
if date_parts and date_parts[0]:
data['date_of_birth'] = date_parts[0]
if date_parts[1]:
if len(date_parts) > 1 and date_parts[1]:
data['date_of_death'] = date_parts[1]
if value.get('c'):
data['qualifier'] = remove_trailing_punctuation(
Expand Down

0 comments on commit 706dc34

Please sign in to comment.