Skip to content

Commit 158884f

Browse files
author
Justin Merrell
committed
fix: input usage
1 parent d918690 commit 158884f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

runpod/serverless/utils/validator.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
'''
55

66

7-
def validate(input, validation_source):
7+
def validate(job_input, validation_source):
88
'''
99
Validates the input.
1010
Checks to see if the provided inputs match the expected types.
@@ -13,11 +13,11 @@ def validate(input, validation_source):
1313
input_errors = []
1414

1515
for key, value in validation_source.items():
16-
if value['required'] and key not in input:
16+
if value['required'] and key not in job_input:
1717
input_errors.append(f"{key} is a required input.")
1818

19-
if key in input and not isinstance(input[key], value['type']):
19+
if key in job_input and not isinstance(job_input[key], value['type']):
2020
input_errors.append(
21-
f"{key} should be {value['type']} type, not {type(input[key])}.")
21+
f"{key} should be {value['type']} type, not {type(job_input[key])}.")
2222

2323
return input_errors

0 commit comments

Comments
 (0)