Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #333 from erikarvstedt/fix-warnings
Browse files Browse the repository at this point in the history
Fix runtime warning when adding log entries
  • Loading branch information
danielquinn authored Apr 3, 2018
2 parents 68251b8 + fcdcf62 commit ea90bd3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/documents/signals/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
from django.contrib.admin.models import ADDITION, LogEntry
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType

from datetime import datetime
from django.utils import timezone

from ..models import Correspondent, Document, Tag

Expand Down Expand Up @@ -107,7 +106,7 @@ def set_log_entry(sender, document=None, logging_group=None, **kwargs):

LogEntry.objects.create(
action_flag=ADDITION,
action_time=datetime.now(),
action_time=timezone.now(),
content_type=ct,
object_id=document.id,
user=user,
Expand Down

0 comments on commit ea90bd3

Please sign in to comment.