Skip to content
Snippets Groups Projects
Commit c42a1bfc authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

MAINT: move some code

parent 05d62568
No related branches found
No related tags found
2 merge requests!59FIX: if multiple updates for one entity exist, the retrieve would result in an...,!56F insert auth
Pipeline #28065 failed
......@@ -223,11 +223,11 @@ class Crawler(object):
changes = cache.get_updates(run_id)
for _, _, old, new, _ in changes:
new_cont = db.Container()
new_cont = new_cont.from_xml(new)
if new[0].version:
valids = db.Container()
nonvalids = db.Container()
new_cont = db.Container()
new_cont = new_cont.from_xml(new)
for ent in new_cont:
remote_ent = db.Entity(id=ent.id).retrieve()
......@@ -243,8 +243,6 @@ class Crawler(object):
all_updates += len(valids)
else:
current = db.Container()
new_cont = db.Container()
new_cont = new_cont.from_xml(new)
for ent in new_cont:
current.append(db.Entity(id=ent.id).retrieve())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment