mirror of https://gitlab.com/litecord/litecord.git
schema: change raise_err default to True
This commit is contained in:
parent
cd5dbc4886
commit
ee8cfedf69
|
|
@ -293,7 +293,7 @@ class GatewayWebsocket:
|
|||
|
||||
self.state.presence = status
|
||||
|
||||
status = validate(status, GW_STATUS_UPDATE)
|
||||
status = validate(status, GW_STATUS_UPDATE, False)
|
||||
|
||||
if not status:
|
||||
# invalid status, must ignore
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class LitecordValidator(Validator):
|
|||
return value in statuses
|
||||
|
||||
|
||||
def validate(reqjson, schema, raise_err: bool = False):
|
||||
def validate(reqjson, schema, raise_err: bool = True):
|
||||
validator = LitecordValidator(schema)
|
||||
if not validator.validate(reqjson):
|
||||
errs = validator.errors
|
||||
|
|
|
|||
Loading…
Reference in New Issue