Fix - Issue #44

This commit is contained in:
El Mau 2022-01-26 18:12:18 -06:00
parent 8f74d24b14
commit e992103c57
1 changed files with 6 additions and 0 deletions

View File

@ -4161,6 +4161,12 @@ class Productos(BaseModel):
msg = 'Ya existe un producto con esta clave'
data = {'ok': False, 'row': {}, 'new': False, 'msg': msg}
return data
except Exception as e:
msg = str(e)
if 'productos_clave' in msg:
msg = 'Ya existe un producto con esta clave'
data = {'ok': False, 'row': {}, 'new': False, 'msg': msg}
return data
obj = Productos.get(Productos.id==id)
obj.impuestos = obj_taxes