From 6e2e5e73da22a4df4d99ef781164694731b99fb9 Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Sun, 3 Nov 2024 14:11:12 +0100 Subject: [PATCH] fix: handle empty string --- server/interface.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/interface.py b/server/interface.py index b4e5c28..58523ad 100755 --- a/server/interface.py +++ b/server/interface.py @@ -30,6 +30,9 @@ BAD_DISPATCH_ACCESS_TOKEN = "Invalid or missing dispatch-access-token parameter def _apply_substitution(string): + if not string: + return string + for replace, match in app.config["SUBSTITUTIONS"].items(): string = string.replace(match, replace)