elexis-eu/lexonomy

entries are multiplied on search

rambousek opened this issue · 0 comments

With every entrylist search, each entry in result is duplicated.

I think this is the cause in ops.py readEntries:

for r in doSql(dictDB, f"""select id, xml from entries where needs_update = 1 and id in ({",".join("?" * len(ids))})""", ids).fetchall():
    createEntry(dictDB, configs, r["xml"], "system@lexonomy")

needs_update is probably not switched to 0. And also createEntry is probably behaving wrongly (creating new entries, instead of just updating)