mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 11:23:48 -05: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():
|
||||
|
||||
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 != {}
|
||||
|
||||
Reference in New Issue
Block a user