1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Strip microseconds from JournalEntry creation time

This commit is contained in:
Jeremy Stretch
2021-03-29 09:48:45 -04:00
parent e52702f6c2
commit 8a8342b106

View File

@ -413,7 +413,8 @@ class JournalEntry(BigIDModel):
verbose_name_plural = 'journal entries'
def __str__(self):
return f"{self.created} - {self.get_kind_display()}"
time_created = self.created.replace(microsecond=0)
return f"{time_created} - {self.get_kind_display()}"
def get_kind_class(self):
return JournalEntryKindChoices.CSS_CLASSES.get(self.kind)