Your decorator is wrong

this

def check_mod_set_active(callee):
    if session.active_mod == None:
        session.flash = 'No active module selected.'
        redirect(URL('mod', 'index'))
    else:
        return callee

shoud be

def check_mod_set_active(callee):
    def wrapper():
        if session.active_mod == None:
            session.flash = 'No active module selected.'
            redirect(URL('mod', 'index'))
        else:
            return callee()
    return wrapper

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to