Added search bar to collection list
This commit is contained in:
parent
1f0a336ed4
commit
0bd2596ebc
@ -184,7 +184,11 @@ class LibraryWorkListView(WorkListView):
|
||||
return True
|
||||
|
||||
def get_works(self):
|
||||
collections = models.Collection.objects.filter(administrators=self.request.user)
|
||||
collections = models.Collection.objects
|
||||
|
||||
if not self.request.user.is_superuser:
|
||||
collections = collections.filter(administrators=self.request.user)
|
||||
|
||||
return Work.objects.filter(collection__in=collections).select_related('collection')
|
||||
|
||||
class CollectionWorkListView(WorkListView):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user