Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GeoNode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Spatial Urban Data Observatory
GeoNode
Commits
6a8a2025
Unverified
Commit
6a8a2025
authored
1 year ago
by
Giovanni Allegri
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
thesaurus topics should only return its own keys (#11644)
parent
ec457bcd
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
geonode/facets/providers/thesaurus.py
+1
-1
1 addition, 1 deletion
geonode/facets/providers/thesaurus.py
geonode/facets/tests.py
+1
-0
1 addition, 0 deletions
geonode/facets/tests.py
with
2 additions
and
1 deletion
geonode/facets/providers/thesaurus.py
+
1
−
1
View file @
6a8a2025
...
...
@@ -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
(
...
...
This diff is collapsed.
Click to expand it.
geonode/facets/tests.py
+
1
−
0
View file @
6a8a2025
...
...
@@ -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
}),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment