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:
|
||||
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)
|
||||
|
||||
|
||||
|
|
|
@ -66,7 +66,10 @@ class ConnectionMiddleware(object):
|
|||
rfc = session.get('rfc', '')
|
||||
if id_session and rfc:
|
||||
opt = util.get_con(rfc)
|
||||
if opt:
|
||||
main.conectar(opt)
|
||||
else:
|
||||
raise falcon.HTTPTemporaryRedirect('/')
|
||||
|
||||
def process_response(self, req, resp, resource):
|
||||
main.desconectar()
|
||||
|
|
Loading…
Reference in New Issue