From b973fecaf357372fd0e6a32309f78da3ce8dbedd Mon Sep 17 00:00:00 2001 From: Mauricio Baeza Date: Sun, 10 Dec 2017 15:51:22 -0600 Subject: [PATCH] =?UTF-8?q?Fix=20al=20actualizar=20contrase=C3=B1a=20de=20?= =?UTF-8?q?usuario?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/app/controllers/util.py | 4 ++-- source/app/models/main.py | 2 +- source/db/valores_iniciales.json | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/app/controllers/util.py b/source/app/controllers/util.py index 7f5c5c0..be759fc 100644 --- a/source/app/controllers/util.py +++ b/source/app/controllers/util.py @@ -1385,8 +1385,8 @@ def crear_db(nombre): def _to_seafile(path_db, data): - # ~ if DEBUG: - # ~ return + if DEBUG: + return _, filename = os.path.split(path_db) if SEAFILE_SERVER: diff --git a/source/app/models/main.py b/source/app/models/main.py index 98a400a..f710e7e 100644 --- a/source/app/models/main.py +++ b/source/app/models/main.py @@ -263,9 +263,9 @@ class Usuarios(BaseModel): @classmethod def edit(self, values): - print (values) id = int(values.pop('id')) try: + values['contraseƱa'] = values.pop('contra') q = Usuarios.update(**values).where(Usuarios.id==id) result = {'ok': bool(q.execute())} except IntegrityError: diff --git a/source/db/valores_iniciales.json b/source/db/valores_iniciales.json index a2e306a..27e6b54 100644 --- a/source/db/valores_iniciales.json +++ b/source/db/valores_iniciales.json @@ -10,11 +10,11 @@ "tabla": "SATImpuestos", "datos": [ {"key": "002", "name": "IVA", "tasa": 0.16, "activo": true, "default": true}, - {"key": "001", "name": "ISR", "tasa": 0.10, "tipo": "R", "activo": true}, - {"key": "002", "name": "IVA", "tasa": 0.0, "activo": true}, - {"key": "002", "name": "IVA", "tasa": 0.10, "tipo": "R", "activo": true}, - {"key": "002", "name": "IVA", "tasa": 0.106667, "tipo": "R", "activo": true}, - {"key": "000", "name": "Exento", "tipo": "E", "factor": "E", "activo": true} + {"key": "001", "name": "ISR", "tasa": 0.10, "tipo": "R", "activo": false}, + {"key": "002", "name": "IVA", "tasa": 0.0, "activo": false}, + {"key": "002", "name": "IVA", "tasa": 0.10, "tipo": "R", "activo": false}, + {"key": "002", "name": "IVA", "tasa": 0.106667, "tipo": "R", "activo": false}, + {"key": "000", "name": "Exento", "tipo": "E", "factor": "E", "activo": false} ] }, {