Avoid crash for malformed xanalink text.

This commit is contained in:
Edward Betts 2018-10-11 21:16:28 +01:00
parent 4948a16fe1
commit b6f3075ba4

View file

@ -299,7 +299,11 @@ class XanaLink(Item):
if link['type'] != 'title':
return
try:
facet1, facet2 = link['facets']
except ValueError:
return
link_type, _, ident = facet1[0].partition(': ')
item = Item.from_external(ident, home)