We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1f3ca2 commit 717cd3fCopy full SHA for 717cd3f
src/util/fields.py
@@ -147,7 +147,12 @@ def clean_context(context):
147
[model, r"\y{}\y".format(fieldname)],
148
)
149
for id_, name, context_s in cr.fetchall():
150
- context = safe_eval(context_s or "{}", SelfPrintEvalContext(), nocopy=True)
+ try:
151
+ context = safe_eval(context_s or "{}", SelfPrintEvalContext(), nocopy=True)
152
+ except SyntaxError:
153
+ cr.execute("DELETE FROM ir_filters WHERE id = %s", [id_])
154
+ add_to_migration_reports(("ir.filters", id_, name), "Filters/Dashboards")
155
+ continue
156
changed = clean_context(context)
157
cr.execute("UPDATE ir_filters SET context = %s WHERE id = %s", [unicode(context), id_])
158
if changed:
0 commit comments