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

MAINT: minor fixes

parent 807d5962
No related branches found
No related tags found
2 merge requests!73MAINT: change wording of TableImporter argument and allow converters and...,!71MAINT: adapt to new default keyword RECORD in FIND queries
Pipeline #35463 failed
......@@ -58,6 +58,8 @@ echo "./crawl.py -a $RUN_ID /"
set +e
if grep "There where unauthorized changes" $OUT
then
echo "There were still unauthorized changes which should not have happend!"
echo "Test FAILED!"
exit 1
fi
set -e
......
......@@ -14,7 +14,8 @@ if __name__ == "__main__":
# delete everything
print("Clearing database")
recs = db.execute_query("FIND ENTITY entity with id>99")
recs.delete()
if len(recs) > 0:
recs.delete()
assert 0 == len(db.execute_query("FIND File which is stored at "
"**/poster.pdf"))
print("Importing stored elements")
......
......@@ -807,7 +807,7 @@ class RowCFood(AbstractCFood):
def update_identifiables(self):
rec = self.identifiables[0]
for key, value in self.item.iteritems():
for key, value in self.item.items():
if key in self.unique_cols:
continue
assure_property_is(rec, key,
......
......@@ -212,7 +212,7 @@ class Crawler(object):
new_cont.insert(unique=False)
logger.info("Successfully inserted {} records!".format(len(new_cont)))
all_inserts += len(new_cont)
logger.info("Finished with authorized updates.")
logger.info("Finished with authorized insertes.")
changes = cache.get_updates(run_id)
......@@ -220,7 +220,7 @@ class Crawler(object):
new_cont = db.Container()
new_cont = new_cont.from_xml(new)
ids = []
tmp = []
tmp = db.Container()
update_incomplete = False
# remove duplicate entities
for el in new_cont:
......@@ -237,7 +237,7 @@ class Crawler(object):
for ent in new_cont:
remote_ent = db.Entity(id=ent.id).retrieve()
if ent.version == remote_ent.version:
valids.append(remote_ent)
valids.append(ent)
else:
update_incomplete = True
nonvalids.append(remote_ent)
......
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