Skip to content
Snippets Groups Projects
Unverified Commit 6a8a2025 authored by Giovanni Allegri's avatar Giovanni Allegri Committed by GitHub
Browse files

thesaurus topics should only return its own keys (#11644)

parent ec457bcd
No related branches found
No related tags found
No related merge requests found
......@@ -111,7 +111,7 @@ class ThesaurusFacetProvider(FacetProvider):
def get_topics(self, keys: list, lang="en", **kwargs) -> list:
q = (
ThesaurusKeyword.objects.filter(id__in=keys)
ThesaurusKeyword.objects.filter(id__in=keys, thesaurus__identifier=self.name)
.values("id", "alt_label")
.annotate(
localized_label=Subquery(
......
......@@ -498,6 +498,7 @@ class TestFacets(GeoNodeBaseTestSupport):
{regfilter: "R0", t0filter: t("0_1"), "key": [t("1_1"), t("1_0")]},
{t("1_0"): None, t("1_1"): None},
),
("t_1", {"key": [t("0_1")]}, {}),
# regions
(regname, {t1filter: t("1_1")}, {"R1": 1}),
(regname, {t1filter: t("1_1"), "key": ["R0", "R1"]}, {"R1": 1, "R0": None}),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment