[FIX] models: auto convert monetary fields
This commit is contained in:
@@ -2515,6 +2515,7 @@ class BaseModel(object):
|
||||
('timestamp', 'date', 'date', '::date'),
|
||||
('numeric', 'float', get_pg_type(f)[1], '::'+get_pg_type(f)[1]),
|
||||
('float8', 'float', get_pg_type(f)[1], '::'+get_pg_type(f)[1]),
|
||||
('float8', 'monetary', get_pg_type(f)[1], '::'+get_pg_type(f)[1]),
|
||||
]
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user