From d99fbe9789d1f3784ba059e888a8aaf23ee8c78b Mon Sep 17 00:00:00 2001 From: Artem Batalov Date: Thu, 14 Dec 2023 13:19:25 +0300 Subject: [PATCH] Fix unknown messageName schema --- smart_kit/message/validators/json_schema_validator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/smart_kit/message/validators/json_schema_validator.py b/smart_kit/message/validators/json_schema_validator.py index a29ecbde..2f06cb65 100644 --- a/smart_kit/message/validators/json_schema_validator.py +++ b/smart_kit/message/validators/json_schema_validator.py @@ -34,7 +34,8 @@ def _log(self, exception: VALIDATOR_EXCEPTION, message: SmartAppMessage, level=" def _validate(self, message: SmartAppFromMessage): validator = self._schemas.get(message.message_name) - validator(message.payload) + if validator: + validator(message.payload) class FastJSONSchemaValidator(JSONSchemaValidator):