Mercurial > trytond
changeset 2787:140087fedf85
Fix nested order_calc tables_args manipulation
issue2572
review340003
| author | Cédric Krier <ced@b2ck.com> |
|---|---|
| date | Sat, 05 May 2012 09:28:41 +0200 |
| parents | d508e3aa3407 |
| children | 0f00112edc77 |
| files | trytond/model/modelsql.py |
| diffstat | 1 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/trytond/model/modelsql.py Fri May 04 10:36:26 2012 +0300 +++ b/trytond/model/modelsql.py Sat May 05 09:28:41 2012 +0200 @@ -1895,8 +1895,7 @@ table_name + '.' + link_field) for i in range(len(tables)): if table_name in tables[i]: - args = tables_args[tables[i]] - del tables_args[tables[i]] + args = tables_args.pop(tables[i], []) tables[i] = tables[i].replace(table_name, table_name + '.' + link_field) tables_args[tables[i]] = args @@ -1931,8 +1930,7 @@ table_name + '.' + link_field) for i in range(len(tables)): if table_name in tables[i]: - args = tables_args[tables[i]] - del tables_args[tables[i]] + args = tables_args.pop(tables[i], []) tables[i] = tables[i].replace(table_name, table_name + '.' + link_field) tables_args[tables[i]] = args @@ -1951,8 +1949,7 @@ table_name2 + '.' + link_field2) for i in range(1, len(tables)): if table_name2 in tables[i]: - args = tables_args[tables[i]] - del tables_args[tables[i]] + args = tables_args.pop(tables[i], []) tables[i] = tables[i].replace(table_name2, table_name2 + '.' + link_field2) tables_args[tables[i]] = args
