Merge pull request #44 from lnbits/fix-issue-528

fix: issue with empty success url
This commit is contained in:
Arc 2024-04-01 07:53:41 +01:00 committed by GitHub
commit 0457413bf2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -128,7 +128,7 @@ async def api_link_create_or_update(
data.min *= data.fiat_base_multiplier
data.max *= data.fiat_base_multiplier
if data.success_url is not None and not data.success_url.startswith("https://"):
if data.success_url and data.success_url != "" and not data.success_url.startswith("https://"):
raise HTTPException(
detail="Success URL must be secure https://...",
status_code=HTTPStatus.BAD_REQUEST,