diff --git a/flask_secure_admin/security/indexes.py b/flask_secure_admin/security/indexes.py index 978c519..0f59414 100644 --- a/flask_secure_admin/security/indexes.py +++ b/flask_secure_admin/security/indexes.py @@ -17,6 +17,7 @@ class SecureRedirectIndex(AdminIndexView): def __init__(self, index_endpoint, *args, **kwargs): self.index_endpoint = index_endpoint + self.is_visible = lambda: False super(SecureRedirectIndex, self).__init__(*args, **kwargs) @expose('/') @@ -27,7 +28,6 @@ def index(self): is not the default value. """ if self.index_endpoint and \ self.index_endpoint != DEFAULT_INDEX_ENDPOINT: - self.is_visible = lambda: False return redirect(url_for(self.index_endpoint, _external=True)) else: return self.render(DEFAULT_INDEX_TEMPLATE)