From fe3f743e32429cf9d2e571c5a99a1cd78832a32f Mon Sep 17 00:00:00 2001 From: El Mau Date: Thu, 27 Jan 2022 18:34:55 -0600 Subject: [PATCH] Fix - Al generar PDF de carta porte sin remolque --- CHANGELOG.md | 3 ++- VERSION | 2 +- source/app/controllers/utils.py | 9 ++++++--- source/app/settings.py | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db10f6d..ad7d1c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ -v 1.45.5 [27-Ene-2022] +v 1.46.0 [27-Ene-2022] ---------------------- - Mejora: Issue #45 + - Mejora: Agregar tipos de persimos SCT para Carta Porte v 1.45.4 [25-Ene-2022] diff --git a/VERSION b/VERSION index 5378813..a8ada98 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -1.45.5 +1.46.0 diff --git a/source/app/controllers/utils.py b/source/app/controllers/utils.py index 8e02fe3..2fee82f 100644 --- a/source/app/controllers/utils.py +++ b/source/app/controllers/utils.py @@ -379,9 +379,12 @@ class CfdiToDict(object): values['autotransporte'].update(values_auto) path = '//cartaporte20:Remolques' - node_tmp = node_auto.xpath(path, namespaces=self.NS)[0][0] - values_auto = CaseInsensitiveDict(node_tmp.attrib) - values['autotransporte'].update(values_auto) + try: + node_tmp = node_auto.xpath(path, namespaces=self.NS)[0][0] + values_auto = CaseInsensitiveDict(node_tmp.attrib) + values['autotransporte'].update(values_auto) + except IndexError: + pass elif 'Ubicaciones' in node.tag: ubicaciones = [] for n in node: diff --git a/source/app/settings.py b/source/app/settings.py index d0eb18f..3d6f63e 100644 --- a/source/app/settings.py +++ b/source/app/settings.py @@ -42,7 +42,7 @@ except ImportError: DEBUG = DEBUG -VERSION = '1.45.5' +VERSION = '1.46.0' EMAIL_SUPPORT = ('soporte@empresalibre.mx',) TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)