Skip to content

Commit 86409e5

Browse files
committed
[FIX] util/fields: rename index
The index rename query had the index names switched. closes #283 Signed-off-by: Christophe Simonis (chs) <[email protected]>
1 parent 6ea6bc9 commit 86409e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ def rename_field(cr, model, old, new, update_references=True, domain_adapter=Non
640640
# Rename corresponding index
641641
new_index_name = make_index_name(table, new)
642642
old_index_name = make_index_name(table, old)
643-
cr.execute('ALTER INDEX IF EXISTS "{0}" RENAME TO "{1}"'.format(new_index_name, old_index_name))
643+
cr.execute('ALTER INDEX IF EXISTS "{0}" RENAME TO "{1}"'.format(old_index_name, new_index_name))
644644

645645
# rename field on inherits
646646
for inh in for_each_inherit(cr, model, skip_inherit):

0 commit comments

Comments
 (0)