Skip to content

Commit

Permalink
omit resource key from params if it is empty (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
teemukataja authored Oct 31, 2024
1 parent d7855a8 commit ce09628
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ async def login_endpoint():
"scope": CONFIG["SCOPE"],
}
# optional param for special cases
if "RESOURCE" in CONFIG:
params["resource"] = CONFIG["RESOURCE"]
if resource := CONFIG.get("RESOURCE", ""):
params["resource"] = resource

# prepare the redirection response
url = CONFIG["url_auth"] + "?" + urlencode(params)
Expand Down

0 comments on commit ce09628

Please sign in to comment.