Skip to content

Commit

Permalink
fix: next page link with cardSearchText
Browse files Browse the repository at this point in the history
  • Loading branch information
aaxelb committed May 24, 2024
1 parent 7cd14a7 commit 721f9b4
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions share/search/search_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def queryparams_from_textsegments(self, queryparam_family: str, textsegments):
for _propertypath_set, _combinable_segments in _by_propertypath_set.items():
_qp_name = QueryparamName(
queryparam_family,
propertypath_set_key(_propertypath_set),
(propertypath_set_key(_propertypath_set),),
)
_qp_value = ' '.join(
_textsegment.as_searchtext()
Expand Down Expand Up @@ -508,14 +508,21 @@ def valuesearch_type_iris(self):
###
# local helpers

def propertypath_key(property_path: tuple[str, ...]):
def propertypathstep_key(pathstep: str) -> str:
if pathstep == GLOB_PATHSTEP:
return pathstep
# assume iri
return urllib.parse.quote(osfmap_shorthand().compact_iri(pathstep))


def propertypath_key(property_path: tuple[str, ...]) -> str:
return PROPERTYPATH_DELIMITER.join(
urllib.parse.quote(osfmap_shorthand().compact_iri(_property_iri))
for _property_iri in property_path
propertypathstep_key(_pathstep)
for _pathstep in property_path
)


def propertypath_set_key(propertypath_set: frozenset[tuple[str, ...]]):
def propertypath_set_key(propertypath_set: frozenset[tuple[str, ...]]) -> str:
return join_queryparam_value(
propertypath_key(_propertypath)
for _propertypath in propertypath_set
Expand Down

0 comments on commit 721f9b4

Please sign in to comment.