Wrestling with Citations with no sources

svn: r19668
This commit is contained in:
Doug Blank 2012-05-27 02:38:55 +00:00
parent 7b97bef883
commit 82dde838e9

View File

@ -359,12 +359,17 @@ class DjangoInterface(object):
media_list = self.get_media_list(citation) media_list = self.get_media_list(citation)
datamap = self.get_citation_datamap(citation) datamap = self.get_citation_datamap(citation)
date = self.get_date(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), return (str(citation.handle),
citation.gramps_id, citation.gramps_id,
date, date,
citation.page, citation.page,
citation.confidence, citation.confidence,
citation.source.handle, handle,
note_list, note_list,
media_list, media_list,
datamap, datamap,