From: Radek Czajka Date: Thu, 19 Jan 2012 15:40:51 +0000 (+0100) Subject: fix for empty salias X-Git-Tag: 1.7~170^2~5 X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/05843e29b4fffcc676da0e67b7a840a24d7b91d4?ds=inline fix for empty salias --- diff --git a/librarian/dcparser.py b/librarian/dcparser.py index f64317a..5a571ec 100644 --- a/librarian/dcparser.py +++ b/librarian/dcparser.py @@ -248,7 +248,7 @@ class WorkInfo(object): if not field.multiple: raise "OUCH!! for field %s" % name - return value[0] + return value[0] if value else None except (KeyError, AttributeError): return object.__getattribute__(self, name)