[IMP] models.py: do not log handled "bad query"
This commit is contained in:
parent
d87aedb731
commit
7ab70cab74
|
@ -2508,7 +2508,7 @@ class BaseModel(object):
|
|||
if f_pg_type == 'varchar' and f._type in ('char', 'selection') and f_pg_size and (f.size is None or f_pg_size < f.size):
|
||||
try:
|
||||
with cr.savepoint():
|
||||
cr.execute('ALTER TABLE "%s" ALTER COLUMN "%s" TYPE %s' % (self._table, k, pg_varchar(f.size)))
|
||||
cr.execute('ALTER TABLE "%s" ALTER COLUMN "%s" TYPE %s' % (self._table, k, pg_varchar(f.size)), log_exceptions=False)
|
||||
except psycopg2.NotSupportedError:
|
||||
# In place alter table cannot be done because a view is depending of this field.
|
||||
# Do a manual copy. This will drop the view (that will be recreated later)
|
||||
|
|
Loading…
Reference in New Issue