misc: don't abort on errors reindexing a formdata (#58084)

This commit is contained in:
Frédéric Péters 2021-10-22 10:25:47 +02:00
parent a2534dcff1
commit 8f8d4bf481
1 changed files with 5 additions and 2 deletions

View File

@ -3663,8 +3663,11 @@ def reindex():
# load and store all formdatas
for formdef in FormDef.select():
for formdata in formdef.data_class().select(iterator=True):
formdata.migrate()
formdata.store()
try:
formdata.migrate()
formdata.store()
except Exception as e:
print('error reindexing %s (%r)', formdata, e)
set_reindex('formdata', 'done', conn=conn, cur=cur)
conn.commit()