mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Show the last action date and user on the application list
This commit is contained in:
@@ -77,6 +77,12 @@ class Application(models.Model):
|
||||
|
||||
return blacklist
|
||||
|
||||
@property
|
||||
def last_action(self):
|
||||
if self.audit_set.count():
|
||||
return self.audit_set.all().order_by('-date')[0]
|
||||
return None
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
|
||||
user = None
|
||||
|
||||
Reference in New Issue
Block a user