forked from elmau/empresa-libre
Fix - En sessiones mal cerradas
This commit is contained in:
parent
848c507e47
commit
739a4a88b2
|
@ -155,11 +155,11 @@ def get_con(rfc=''):
|
||||||
if not rfc:
|
if not rfc:
|
||||||
rfc = get_value('RFC').upper()
|
rfc = get_value('RFC').upper()
|
||||||
if not rfc:
|
if not rfc:
|
||||||
return False
|
return {}
|
||||||
|
|
||||||
args = _get_args(rfc.upper())
|
args = _get_args(rfc.upper())
|
||||||
if not args:
|
if not args:
|
||||||
return False
|
return {}
|
||||||
return loads(args)
|
return loads(args)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,10 @@ class ConnectionMiddleware(object):
|
||||||
rfc = session.get('rfc', '')
|
rfc = session.get('rfc', '')
|
||||||
if id_session and rfc:
|
if id_session and rfc:
|
||||||
opt = util.get_con(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):
|
def process_response(self, req, resp, resource):
|
||||||
main.desconectar()
|
main.desconectar()
|
||||||
|
|
Loading…
Reference in New Issue