diff --git a/src/backend/views.py b/src/backend/views.py index 67e7d507147f3a880756ee4e33542031f7fcf3f7..5255d1b052b06b5b1b5c9e9ace0f3faf2cacbdf7 100644 --- a/src/backend/views.py +++ b/src/backend/views.py @@ -308,11 +308,15 @@ class CollectionsView(AuthentificatedView, TemplateView): def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) - collections = Collection.objects.all() + collections = list(Collection.objects.all()) # Add sources to each collection inside collections for collection in collections: collection.sources = [periode.source.domain for periode in collection.periods.all()] + if len(collection.sources) == 1: + source = collection.sources[0] + if source.lower() == "numdam": + collections.remove(collection) context["collections"] = collections