Raise NotImplementedError in AuditableMixin if the model does not have the properties portfolio_id or application_id

This commit is contained in:
leigh-mil
2019-05-21 16:55:55 -04:00
parent 5e2f00b1c2
commit 9f66bbafe5
6 changed files with 28 additions and 3 deletions

View File

@@ -96,6 +96,14 @@ class User(
def displayname(self):
return self.full_name
@property
def portfolio_id(self):
return None
@property
def application_id(self):
return None
def __repr__(self):
return "<User(name='{}', dod_id='{}', email='{}', has_portfolios='{}', id='{}')>".format(
self.full_name, self.dod_id, self.email, self.has_portfolios, self.id