Remove defaults from JSONModel

We’re not setting them anywhere any more.
This commit is contained in:
Chris Hill-Scott
2019-06-05 11:12:43 +01:00
parent f34a252e72
commit 954aecf160

View File

@@ -4,13 +4,10 @@ from flask import abort
class JSONModel():
ALLOWED_PROPERTIES = set()
DEFAULTS = dict()
def __init__(self, _dict):
# in the case of a bad request _dict may be `None`
self._dict = _dict or {}
for attribute, default_value in self.DEFAULTS.items():
self._dict[attribute] = self._dict.get(attribute, default_value)
def __bool__(self):
return self._dict != {}