Bug fix adding xanadoc span references to database.
This commit is contained in:
parent
9199ce427c
commit
45f244a2d5
|
@ -66,11 +66,13 @@ def populate_references():
|
|||
continue
|
||||
for url, start, length in doc_edl['spans']:
|
||||
src_doc = model.Item.from_external(url, home=home)
|
||||
if not src_doc.id:
|
||||
continue
|
||||
print(xanadoc.id, '->', src_doc.id)
|
||||
as_tuple = (link_obj.id, item.id)
|
||||
as_tuple = (xanadoc.id, src_doc.id)
|
||||
if as_tuple in seen:
|
||||
continue
|
||||
ref = model.Reference(subject_id=link_obj.id, object_id=item.id)
|
||||
ref = model.Reference(subject_id=xanadoc.id, object_id=src_doc.id)
|
||||
database.session.add(ref)
|
||||
seen.add(as_tuple)
|
||||
|
||||
|
|
Loading…
Reference in a new issue