1. bogeymin
  2. django-model-audit

Commits

bogeymin  committed ca291d0

Added full name output when available for added_by and modified_by.

  • Participants
  • Parent commits 2884118
  • Branches master

Comments (0)

Files changed (1)

File model_audit/models.py

View file
 
     @property
     def added_by(self):
-        return self.audit_user().added_by
+        return self.audit_user().added_by.get_full_name() or self.audit_user().added_by
 
     def audit_user(self):
         """Return a ``UserAudit`` instance for the current object."""
 
     @property
     def modified_by(self):
-        return self.audit_user().modified_by
+        return self.audit_user().modified_by.get_full_name() or self.audit_user().modified_by