From efcd932481ea0ca2815f8ceec990fa01a96537ee Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Tue, 11 Jul 2023 16:19:27 +0200 Subject: [PATCH] re-implement get_roots in view --- storage/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/storage/views.py b/storage/views.py index b6a0275..27039cc 100644 --- a/storage/views.py +++ b/storage/views.py @@ -59,7 +59,10 @@ def apply_smart_search(query, objects): def index(request): - return render(request, "results.html", {"results": Item.objects.filter_roots()}) + # get_roots was removed, so we're doing it this way now. + return render( + request, "results.html", {"results": Item.objects.filter(**{"path__level": 1})} + ) def search(request):