Skip to content

Commit 1d0c69f

Browse files
committed
fix error
1 parent 04bcd85 commit 1d0c69f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/requests_to_models/request_parser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ def _validate_value_regex(self, key, value, pattern):
6060
if not re.match(pattern, value):
6161
raise ValidationError("Value of key '{}' doesn't match to pattern {}".format(key, pattern))
6262

63-
def _validate_value_type(self, key, value, type):
64-
if type(value) is not type:
65-
raise ValidationError('Value of key "{}" should be {}'.format(key, type))
63+
def _validate_value_type(self, key, value, expected_type):
64+
if type(value) is not expected_type:
65+
raise ValidationError('Value of key "{}" should be {}'.format(key, expected_type))
6666

6767
def validate_key(self, key: str):
6868
if type(key) is not str:

0 commit comments

Comments
 (0)