def check_for_stored_levels(url, http_request_method): if not menu.options.ignore_session: if menu.options.level == settings.DEFAULT_INJECTION_LEVEL: menu.options.level = session_handler.applied_levels(url, http_request_method) if type(menu.options.level) is not int : menu.options.level = settings.DEFAULT_INJECTION_LEVEL