Skip to content

Commit

Permalink
Merge pull request #342 from coopiteasy/fix_delete_translation_column…
Browse files Browse the repository at this point in the history
…s_16

[FIX] fix columns filter in `delete_record_translations()` for versions >= 16
  • Loading branch information
pedrobaeza authored Aug 28, 2023
2 parents d6a7093 + 47e566b commit ddce67b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions openupgradelib/openupgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -2692,9 +2692,7 @@ def delete_record_translations(cr, module, xml_ids, field_list=None):
)
cr.execute(query, (record_id,))
checks = cr.fetchall()[0]
for i, (column, check) in enumerate(zip(list_columns, checks)):
if not check:
list_columns.pop(i)
list_columns = [c for c, check in zip(list_columns, checks) if check]
if not list_columns:
continue
columns = ", ".join(list_columns)
Expand Down

0 comments on commit ddce67b

Please sign in to comment.