Skip to content

Commit

Permalink
_distinct
Browse files Browse the repository at this point in the history
  • Loading branch information
ocefpaf committed Dec 6, 2024
1 parent aecb628 commit c172148
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion erddapy/core/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ def _distinct(url: str, *, distinct: OptionalBool = False) -> str:
"""
if distinct:
return f"{url}&distinct()"
url = URL(url)
# yarl cannot handle query entry without values,
# so we need to strip the empty `=`.
return str(url.update_query("distinct()")).strip("=")
return url


Expand Down

0 comments on commit c172148

Please sign in to comment.