Skip to content

Commit 65255fa

Browse files
committed
Added default dictionaries to validate_request if keyword arguments are not passed in.
1 parent 1fc3288 commit 65255fa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

dynatademand/validator.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ def _validate_object(self, schema_type, endpoint_name, data):
5858
jsonschema.validate(schema=self.schemas[schema_type][endpoint_name], instance=data)
5959

6060
def validate_request(self, endpoint_name, path_data=None, query_params=None, request_body=None):
61+
if path_data is None:
62+
path_data = {}
63+
if query_params is None:
64+
query_params = {}
65+
if request_body is None:
66+
query_params = {}
67+
6168
'''
6269
# TODO: None of the path schemas from the documentation are currently valid.
6370
if 'path' in ENDPOINTS[endpoint_name]:

0 commit comments

Comments
 (0)