Fix in import employes
This commit is contained in:
parent
e08e4e038f
commit
aea8aeaecf
|
@ -1667,10 +1667,11 @@ def html_to_pdf(data):
|
|||
|
||||
|
||||
def import_employees(rfc):
|
||||
msg = 'No se pudo cargar el archivo'
|
||||
name = '{}_employees.ods'.format(rfc.lower())
|
||||
path = _join(PATH_MEDIA, 'tmp', name)
|
||||
if not is_file(path):
|
||||
return ()
|
||||
return (), msg
|
||||
|
||||
msg = 'LibreOffice no se pudo iniciar'
|
||||
if APP_LIBO:
|
||||
|
|
|
@ -9021,7 +9021,7 @@ class Empleados(BaseModel):
|
|||
try:
|
||||
q = Empleados.delete().where(Empleados.id==id)
|
||||
return bool(q.execute())
|
||||
except IntegrityError:
|
||||
except Exception as e:
|
||||
return False
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue