From 82dde838e9e949f8412dbd0b4c2a158315cfa597 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 27 May 2012 02:38:55 +0000 Subject: [PATCH] Wrestling with Citations with no sources svn: r19668 --- src/webapp/libdjango.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/webapp/libdjango.py b/src/webapp/libdjango.py index 3a63dc498..9163364a3 100644 --- a/src/webapp/libdjango.py +++ b/src/webapp/libdjango.py @@ -359,12 +359,17 @@ class DjangoInterface(object): media_list = self.get_media_list(citation) datamap = self.get_citation_datamap(citation) date = self.get_date(citation) + # I guess citations can have no source + if citation.source: + handle = citation.source.handle + else: + handle = None return (str(citation.handle), citation.gramps_id, date, citation.page, citation.confidence, - citation.source.handle, + handle, note_list, media_list, datamap,