Skip to content

Commit

Permalink
Handle empty lists
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisseto committed Jul 10, 2016
1 parent 5fef1bd commit f6c252e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions providers/org/crossref/normalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class Contributor(Parser):

class CreativeWork(Parser):
# Dates in CrossRef metadata are often incomplete, see: https://github.com/CrossRef/rest-api-doc/blob/master/rest_api.md#notes-on-dates
title = ctx.title[0]
description = Maybe(ctx, 'subtitle')[0]
title = Join(ctx.title)
description = Join(Maybe(ctx, 'subtitle'))
contributors = Map(Delegate(Contributor), Maybe(ctx, 'author'))
links = Map(Delegate(ThroughLinks), Maybe(ctx, 'URL'))
publishers = Map(Delegate(Association.using(entity=Delegate(Publisher))), Maybe(ctx, 'publisher'))

0 comments on commit f6c252e

Please sign in to comment.