Fix - En sessiones mal cerradas

This commit is contained in:
Mauricio Baeza 2017-12-01 12:45:13 -06:00
parent 848c507e47
commit 739a4a88b2
2 changed files with 6 additions and 3 deletions

View File

@ -155,11 +155,11 @@ def get_con(rfc=''):
if not rfc:
rfc = get_value('RFC').upper()
if not rfc:
return False
return {}
args = _get_args(rfc.upper())
if not args:
return False
return {}
return loads(args)

View File

@ -66,7 +66,10 @@ class ConnectionMiddleware(object):
rfc = session.get('rfc', '')
if id_session and rfc:
opt = util.get_con(rfc)
main.conectar(opt)
if opt:
main.conectar(opt)
else:
raise falcon.HTTPTemporaryRedirect('/')
def process_response(self, req, resp, resource):
main.desconectar()