Skip to content

Commit 6ea2cea

Browse files
committed
[IMP] specific: warn about custom column not being found
Consistently with the warnings for other `rename_custom_*` utils. closes #91 Signed-off-by: Christophe Simonis (chs) <[email protected]>
1 parent e77f161 commit 6ea2cea

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/util/specific.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ def rename_custom_table(
102102
def rename_custom_column(cr, table_name, col_name, new_col_name, custom_module=None, report_details=""):
103103
_validate_table(table_name)
104104
if not column_exists(cr, table_name, col_name):
105+
_logger.warning("Column %r not found on table %r: skip renaming", col_name, table_name)
105106
return
106107
cr.execute('ALTER TABLE "{}" RENAME COLUMN "{}" TO "{}"'.format(table_name, col_name, new_col_name))
107108
module_details = " from module '{}'".format(custom_module) if custom_module else ""

0 commit comments

Comments
 (0)