Skip to content

Commit

Permalink
api fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ansibleguy committed May 20, 2024
1 parent f89fc64 commit 466ced6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ansibleguy-webui/aw/api_endpoints/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def validate(self, attrs: dict):
validate_no_xss(value=attrs[field], field=field)

for prompt_field in ['execution_prompts_required', 'execution_prompts_optional']:
if is_set(attrs[prompt_field]):
if prompt_field in attrs and is_set(attrs[prompt_field]):
if regex_match(Job.execution_prompts_regex, attrs[prompt_field]) is None:
raise ValidationError('Invalid execution prompt pattern')

Expand Down

0 comments on commit 466ced6

Please sign in to comment.