1
0
Fork 0

re-implement get_roots in view

This commit is contained in:
Dariusz Niemczyk 2023-07-11 16:19:27 +02:00
parent 837734a655
commit efcd932481
No known key found for this signature in database
GPG Key ID: 28DFE7164F497CB6
1 changed files with 4 additions and 1 deletions

View File

@ -59,7 +59,10 @@ def apply_smart_search(query, objects):
def index(request): 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): def search(request):