forked from elmau/empresa-libre
Fix - issue #3
This commit is contained in:
parent
e59941db34
commit
676ff29b57
|
@ -1,5 +1,10 @@
|
||||||
|
|
||||||
v 1.41.2 [13-Feb-2021]
|
v 1.41.3 [12-Feb-2021]
|
||||||
|
----------------------
|
||||||
|
- Error - Ticket #3
|
||||||
|
|
||||||
|
|
||||||
|
v 1.41.2 [12-Feb-2021]
|
||||||
----------------------
|
----------------------
|
||||||
- Error - Ticket #2
|
- Error - Ticket #2
|
||||||
|
|
||||||
|
|
|
@ -100,6 +100,17 @@ class PACFinkok(object):
|
||||||
return self._error
|
return self._error
|
||||||
|
|
||||||
def _validate_result(self, result):
|
def _validate_result(self, result):
|
||||||
|
if hasattr(result, 'Incidencias') and not result.Incidencias is None:
|
||||||
|
fault = result.Incidencias.Incidencia[0]
|
||||||
|
cod_error = fault.CodigoError.encode('utf-8').decode()
|
||||||
|
msg_error = fault.MensajeIncidencia.encode('utf-8').decode()
|
||||||
|
error = 'Error: {}\n{}'.format(cod_error, msg_error)
|
||||||
|
if cod_error == '307':
|
||||||
|
return result
|
||||||
|
|
||||||
|
self._error = self.CODE.get(cod_error, error)
|
||||||
|
return {}
|
||||||
|
|
||||||
if hasattr(result, 'CodEstatus'):
|
if hasattr(result, 'CodEstatus'):
|
||||||
ce = result.CodEstatus
|
ce = result.CodEstatus
|
||||||
if ce is None:
|
if ce is None:
|
||||||
|
@ -121,14 +132,6 @@ class PACFinkok(object):
|
||||||
log.error('CodEstatus', type(ce), ce)
|
log.error('CodEstatus', type(ce), ce)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
if hasattr(result, 'Incidencias'):
|
|
||||||
fault = result.Incidencias.Incidencia[0]
|
|
||||||
cod_error = fault.CodigoError.encode('utf-8')
|
|
||||||
msg_error = fault.MensajeIncidencia.encode('utf-8')
|
|
||||||
error = 'Error: {}\n{}'.format(cod_error, msg_error)
|
|
||||||
self._error = self.CODE.get(cod_error, error)
|
|
||||||
return {}
|
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def _get_result(self, client, method, args):
|
def _get_result(self, client, method, args):
|
||||||
|
|
|
@ -42,7 +42,7 @@ except ImportError:
|
||||||
|
|
||||||
|
|
||||||
DEBUG = DEBUG
|
DEBUG = DEBUG
|
||||||
VERSION = '1.41.2'
|
VERSION = '1.41.3'
|
||||||
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
|
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
|
||||||
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)
|
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue