Fix - En categorias nulas al importar
This commit is contained in:
commit
e196a5fac9
|
@ -2277,6 +2277,8 @@ class ImportFacturaLibre(object):
|
|||
"""
|
||||
for row in rows:
|
||||
new = {t: row[s] for s, t in fields}
|
||||
if new['categoria'] == 0:
|
||||
new['categoria'] = None
|
||||
new['descripcion'] = ' '.join(new['descripcion'].split())
|
||||
new['clave_sat'] = DEFAULT_SAT_PRODUCTO
|
||||
self._cursor.execute(sql, (row['id'],))
|
||||
|
|
|
@ -5554,7 +5554,7 @@ def _importar_productos(archivo):
|
|||
try:
|
||||
obj = Productos.create(**new)
|
||||
obj.impuestos = taxes
|
||||
except IntegrityError:
|
||||
except IntegrityError as e:
|
||||
pass
|
||||
|
||||
log.info('Importación terminada...')
|
||||
|
|
Loading…
Reference in New Issue