psycopg2.errors.UndefinedTable return tuple to get babi_execution in err args
#161872 #161894
This commit is contained in:
parent
789bf00aff
commit
714878a7c9
|
@ -34,7 +34,7 @@ index 889916371c..ae51a5d433 100644
|
|||
+ cursor.execute(*foreign_table.select(foreign_table.id,
|
||||
+ where=foreign_red_sql))
|
||||
+ except psycopg2.errors.UndefinedTable as ex:
|
||||
+ if ex.args and 'babi_execution' in ex.args:
|
||||
+ if ex.args and (len(ex.args) > 0) and 'babi_execution' in ex.args[0]:
|
||||
+ return []
|
||||
+ raise
|
||||
related_records = Model.browse([x[0] for x in cursor])
|
||||
|
|
Loading…
Reference in New Issue