Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArchivesSpace: Dates falls back to date expression #29

Merged
merged 1 commit into from
Mar 10, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion agentarchives/archivesspace/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,11 @@ def _fetch_dates_from_record(self, record):
if not dates:
try:
start_date = record['dates'][0]['begin']
except IndexError:
except (IndexError, ValueError):
return ''
end_date = record['dates'][0].get('end')
return self._format_dates(start_date, end_date)
return dates

def _fetch_date_expression_from_record(self, record):
if not record.get('dates'):
Expand Down