Skip to content

Commit

Permalink
fix(output): context_variables are now optional
Browse files Browse the repository at this point in the history
  • Loading branch information
lgatellier committed May 8, 2024
1 parent cb7eff1 commit 68bb52d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions hookbridge/routes/rules/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ def __init__(self, name: str, obj: dict) -> None:
self.__url = obj["url"]
self.__headers = obj["headers"]
self.__body = obj["body"]
self.__variables = {
var_name: parse(json_path)
for json_path, var_name in obj["context_variables"].items()
}
if "context_variables" in obj:
self.__variables = {
var_name: parse(json_path)
for json_path, var_name in obj["context_variables"].items()
}
else:
self.__variables = {}

@property
def name(self) -> str:
Expand Down

0 comments on commit 68bb52d

Please sign in to comment.