mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-26 09:13:58 -04:00
Remove defaults from JSONModel
We’re not setting them anywhere any more.
This commit is contained in:
@@ -4,13 +4,10 @@ from flask import abort
|
|||||||
class JSONModel():
|
class JSONModel():
|
||||||
|
|
||||||
ALLOWED_PROPERTIES = set()
|
ALLOWED_PROPERTIES = set()
|
||||||
DEFAULTS = dict()
|
|
||||||
|
|
||||||
def __init__(self, _dict):
|
def __init__(self, _dict):
|
||||||
# in the case of a bad request _dict may be `None`
|
# in the case of a bad request _dict may be `None`
|
||||||
self._dict = _dict or {}
|
self._dict = _dict or {}
|
||||||
for attribute, default_value in self.DEFAULTS.items():
|
|
||||||
self._dict[attribute] = self._dict.get(attribute, default_value)
|
|
||||||
|
|
||||||
def __bool__(self):
|
def __bool__(self):
|
||||||
return self._dict != {}
|
return self._dict != {}
|
||||||
|
|||||||
Reference in New Issue
Block a user