Skip to content

Commit 5f539ec

Browse files
committed
Fixed issue if variable is not defined
1 parent 8fc9f37 commit 5f539ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/graphql_server/http/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def simple_renderer(template: str, **values: str) -> str:
3939
def get_var(match_obj: re.Match[str]) -> str:
4040
var_name = match_obj.group(1)
4141
if var_name is not None:
42-
return values.get(var_name, "")
42+
return values.get(var_name) or tojson("")
4343
return ""
4444

4545
pattern = r"{{\s*([^}]+)\s*}}"

0 commit comments

Comments
 (0)