mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-24 07:49:25 -05:00
Fix typo in validator
This commit is contained in:
parent
339c11dd86
commit
2cdff00788
@ -70,12 +70,18 @@ class EventValidator(object):
|
|||||||
|
|
||||||
if type(content[key]) == dict:
|
if type(content[key]) == dict:
|
||||||
# we must go deeper
|
# we must go deeper
|
||||||
msg = self._check_json(content[key], template[key])
|
msg = self._check_json_template(
|
||||||
|
content[key],
|
||||||
|
template[key]
|
||||||
|
)
|
||||||
if msg:
|
if msg:
|
||||||
return msg
|
return msg
|
||||||
elif type(content[key]) == list:
|
elif type(content[key]) == list:
|
||||||
# make sure each item type in content matches the template
|
# make sure each item type in content matches the template
|
||||||
for entry in content[key]:
|
for entry in content[key]:
|
||||||
msg = self._check_json(entry, template[key][0])
|
msg = self._check_json_template(
|
||||||
|
entry,
|
||||||
|
template[key][0]
|
||||||
|
)
|
||||||
if msg:
|
if msg:
|
||||||
return msg
|
return msg
|
Loading…
Reference in New Issue
Block a user