Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions apollo/frontend/views_admin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
import re
from datetime import datetime
from io import BytesIO
from urllib.parse import urlencode
Expand Down Expand Up @@ -209,12 +210,15 @@ def get_query(self):
def filter_hidden(self, query):
model_class = self.model
query_params = request.args.to_dict(flat=False)
show_hidden = bool(query_params.get(self.query_param_name))
if show_hidden:
show_hidden_direct = bool(query_params.get(self.query_param_name))
show_hidden_param = any(
re.search(rf'{self.query_param_name}=[^&]+', item)
for item in query_params.get("url", [])
)
if show_hidden_direct or show_hidden_param:
pass
else:
query = query.filter(model_class.is_hidden == False) # noqa

return query

def render(self, template, **kwargs):
Expand Down