Avoid crash for malformed xanalink text.
This commit is contained in:
parent
4948a16fe1
commit
b6f3075ba4
|
@ -299,7 +299,11 @@ class XanaLink(Item):
|
||||||
if link['type'] != 'title':
|
if link['type'] != 'title':
|
||||||
return
|
return
|
||||||
|
|
||||||
|
try:
|
||||||
facet1, facet2 = link['facets']
|
facet1, facet2 = link['facets']
|
||||||
|
except ValueError:
|
||||||
|
return
|
||||||
|
|
||||||
link_type, _, ident = facet1[0].partition(': ')
|
link_type, _, ident = facet1[0].partition(': ')
|
||||||
item = Item.from_external(ident, home)
|
item = Item.from_external(ident, home)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue