diff --git a/sourcing/model.py b/sourcing/model.py index d64d547..7b527cb 100644 --- a/sourcing/model.py +++ b/sourcing/model.py @@ -213,8 +213,9 @@ class XanaLink(Item): print(ident, item) ident2, start, length = parse_span(facet2[0]) - title = SourceDoc.from_external(ident2).text[start:length + start] - titles[item] = title + source_of_title = SourceDoc.from_external(ident2) + if source_of_title: + titles[item] = source_of_title.text[start:length + start] return titles class SourceDoc(Item): diff --git a/sourcing/templates/edit.html b/sourcing/templates/edit.html index 9268075..98ad51c 100644 --- a/sourcing/templates/edit.html +++ b/sourcing/templates/edit.html @@ -1,6 +1,6 @@ {% from "form/controls.html" import render_field %} -{% set title="edit " + doc.title %} +{% set title="edit " + doc.title() %} {% set action=doc.edit_url %} {% set label="save" %} diff --git a/sourcing/templates/navbar.html b/sourcing/templates/navbar.html index 24bf377..53cc5ad 100644 --- a/sourcing/templates/navbar.html +++ b/sourcing/templates/navbar.html @@ -12,7 +12,7 @@