From 3031c116cc68ac0ea252774eaf94f36017d5b151 Mon Sep 17 00:00:00 2001 From: Jean-Romain Garnier Date: Sat, 25 Apr 2020 00:13:00 +0200 Subject: [PATCH] Improve description for events with None objects --- logs/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logs/models.py b/logs/models.py index 292eead1..acf8771b 100644 --- a/logs/models.py +++ b/logs/models.py @@ -422,7 +422,7 @@ class VersionAction(HistoryEvent): self.version = version def name(self): - return "{} {}".format(self.model_name().title(), self.version.object_repr) + return self.version._object_cache or self.version.object_repr def application(self): return self.version.content_type.app_label