Skip to content

Commit

Permalink
Remove unnecessary code in created method.
Browse files Browse the repository at this point in the history
  • Loading branch information
2ykwang committed Oct 4, 2022
1 parent 993cd84 commit e6fba13
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions auditlog/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from django.urls.exceptions import NoReverseMatch
from django.utils.html import format_html, format_html_join
from django.utils.safestring import mark_safe
from django.utils.timezone import localtime

from auditlog.models import LogEntry
from auditlog.registry import auditlog
Expand All @@ -17,7 +16,7 @@

class LogEntryAdminMixin:
def created(self, obj):
return localtime(obj.timestamp).strftime("%Y-%m-%d %H:%M:%S")
return obj.timestamp

created.short_description = "Created"

Expand Down

0 comments on commit e6fba13

Please sign in to comment.