In subcommunities/services/service.py we have:
self_link = LinksTemplate(
# https://github.com/inveniosoftware/invenio-communities/issues/1218
# pagination_links("{+api}/communities/{community_id}/subcommunities{?args*}"),
pagination_links("{+api}/communities/{community_id}/subcommunities"),
context={"community_id": id_},
)
subcommunities._links_tpl = self_link
because the self_link returned from searching is not the subcommunities endpoint. As such we (improperly) directly replace the private _links_tpl with our own — however we do not have access to the correct args meaning that the self link, which could be subcommunties?p=1&size=10 will always return subcommunities as we don't have access
In subcommunities/services/service.py we have:
because the
self_linkreturned from searching is not the subcommunities endpoint. As such we (improperly) directly replace the private_links_tplwith our own — however we do not have access to the correctargsmeaning that the self link, which could besubcommunties?p=1&size=10will always returnsubcommunitiesas we don't have access