Skip to content

Wrong facet function called when defining a custom group #7654

@Zharktas

Description

@Zharktas

CKAN version

2.9, 2.10, master

Describe the bug

When developer defines a custom group with group_type something else than group, group_facets is not called, instead ckan calls organization_facets

ckan/ckan/views/group.py

Lines 378 to 387 in 71d5d1b

def _update_facet_titles(
facets: 'OrderedDict[str, str]',
group_type: str) -> 'OrderedDict[str, str]':
for plugin in plugins.PluginImplementations(plugins.IFacets):
facets = (
plugin.group_facets(facets, group_type, None)
if group_type == "group"
else plugin.organization_facets(facets, group_type, None)
)
return facets

Steps to reproduce

Create a custom group with group_type something else than group. Try to update facets of the said group.

Expected behavior

group_facets should be called when its not an organization.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions