mirror of
https://github.com/NaN-tic/trytond-patches.git
synced 2023-12-14 06:03:03 +01:00
psycopg2.errors.UndefinedTable return tuple to get babi_execution in err args
#161872 #161894
This commit is contained in:
parent
f625ec5787
commit
316eacbeac
|
@ -34,7 +34,7 @@ index d762a27a..5ca47c34 100644
|
||||||
+ cursor.execute(*foreign_table.select(foreign_table.id,
|
+ cursor.execute(*foreign_table.select(foreign_table.id,
|
||||||
+ where=foreign_red_sql))
|
+ where=foreign_red_sql))
|
||||||
+ except psycopg2.errors.UndefinedTable as ex:
|
+ 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 []
|
+ return []
|
||||||
+ raise
|
+ raise
|
||||||
related_records = Model.browse([x[0] for x in cursor])
|
related_records = Model.browse([x[0] for x in cursor])
|
||||||
|
|
Loading…
Reference in a new issue