Make invited user model inherit from JSONModel

This is more consistent, and less fiddly that always having to call it
with a dictionary expansion.
This commit is contained in:
Chris Hill-Scott
2019-06-05 10:47:55 +01:00
parent f8fb2d3c8f
commit bd9acb1310
7 changed files with 127 additions and 87 deletions

View File

@@ -18,6 +18,7 @@ class JSONModel():
def __getattr__(self, attr):
if attr in self.ALLOWED_PROPERTIES:
return self._dict[attr]
return
raise AttributeError('`{}` is not a {} attribute'.format(
attr,
self.__class__.__name__.lower(),