Skip to content

Commit

Permalink
Bug fix: encode organisation number (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggravlingen authored Aug 8, 2024
1 parent 3ec5a8a commit f560085
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pygleif/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from __future__ import annotations

from urllib import parse

from pygleif.api import SearchResponse

from .base import PyGleifBase
Expand All @@ -12,7 +14,8 @@ class Search(PyGleifBase):

def __init__(self, orgnr: str) -> None:
"""Init class."""
self.search_string = f"?filter[fulltext]={orgnr}"
encoded_org_nr = parse.quote(orgnr, safe="")
self.search_string = f"?filter[fulltext]={encoded_org_nr}"

@property
def response(self) -> SearchResponse | None:
Expand Down

0 comments on commit f560085

Please sign in to comment.