From 0795020596d6c44b1937ec2750b3eff5e1885c0b Mon Sep 17 00:00:00 2001 From: Dylan Hillerbrand Date: Wed, 2 Oct 2024 16:16:35 -0400 Subject: [PATCH] fix(source melody search): remove error from "source" queryset --- django/cantusdb_project/main_app/views/chant.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/django/cantusdb_project/main_app/views/chant.py b/django/cantusdb_project/main_app/views/chant.py index 4bb38dc16..b68435911 100644 --- a/django/cantusdb_project/main_app/views/chant.py +++ b/django/cantusdb_project/main_app/views/chant.py @@ -553,9 +553,9 @@ def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) # if searching in a specific source, pass the source into context if self.request.GET.get("source"): - context["source"] = Source.objects.get( - id=self.request.GET.get("source") - ).select_related("holding_institution", "feast", "service", "genre") + context["source"] = Source.objects.select_related( + "holding_institution" + ).get(id=self.request.GET.get("source")) return context