From 0f82665722464ad611953f141a80b5fcb25ba024 Mon Sep 17 00:00:00 2001 From: Mauricio Baeza Date: Mon, 11 Dec 2017 21:44:40 -0600 Subject: [PATCH 1/2] =?UTF-8?q?Agregar=20tasa=20de=20retenci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/app/controllers/util.py | 1 + source/app/main_linux.ini | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 source/app/main_linux.ini diff --git a/source/app/controllers/util.py b/source/app/controllers/util.py index 7130985..9ea047c 100644 --- a/source/app/controllers/util.py +++ b/source/app/controllers/util.py @@ -1699,6 +1699,7 @@ class ImportFacturaLibre(object): '0': 0.0, '-2/3': 0.106667, '-0.5': 0.005, + '-10.6666': 0.106667, } data = [] diff --git a/source/app/main_linux.ini b/source/app/main_linux.ini new file mode 100644 index 0000000..119d72c --- /dev/null +++ b/source/app/main_linux.ini @@ -0,0 +1,8 @@ +[uwsgi] +http = 127.0.0.1:8000 +wsgi-file = main.py +callable = app +master = true +processes = 4 +threads = 4 + From c02f5dc25fb8fe448eb001d6145454ab0bdbe231 Mon Sep 17 00:00:00 2001 From: Mauricio Baeza Date: Tue, 12 Dec 2017 17:34:07 -0600 Subject: [PATCH 2/2] Mostrar mensaje no autorizado --- source/app/controllers/util.py | 11 ----------- source/app/models/main.py | 3 +++ 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/source/app/controllers/util.py b/source/app/controllers/util.py index 9ea047c..2bb3f65 100644 --- a/source/app/controllers/util.py +++ b/source/app/controllers/util.py @@ -325,19 +325,8 @@ class Certificado(object): self._path_key = paths['path_key'] self._path_cer = paths['path_cer'] self._modulus = '' - #~ self._save_files() self.error = '' - #~ def _save_files(self): - #~ try: - #~ self._path_key = _save_temp(bytes(self._key)) - #~ self._path_cer = _save_temp(bytes(self._cer)) - #~ except Exception as e: - #~ log.error(e) - #~ self._path_key = '' - #~ self._path_cer = '' - #~ return - def _kill(self, path): try: os.remove(path) diff --git a/source/app/models/main.py b/source/app/models/main.py index dc177bc..976b390 100644 --- a/source/app/models/main.py +++ b/source/app/models/main.py @@ -3479,6 +3479,9 @@ def authenticate(args): obj = Usuarios.get(usuario=args['usuario'], es_activo=True) except Usuarios.DoesNotExist: return respuesta, None + except ProgrammingError as e: + log.error(e) + return respuesta, None if not obj.contraseƱa.check_password(args['contra']): return respuesta, None