Clean up mobile app webhooks (#30123)

This commit is contained in:
Paulus Schoutsen 2019-12-21 22:45:06 +01:00 committed by GitHub
parent fb3bb8220b
commit 834929a14e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 356 additions and 341 deletions

View file

@ -20,6 +20,9 @@ class RequestDataValidator:
def __init__(self, schema, allow_empty=False):
"""Initialize the decorator."""
if isinstance(schema, dict):
schema = vol.Schema(schema)
self._schema = schema
self._allow_empty = allow_empty