mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Merge pull request #333 from erikarvstedt/fix-warnings
Fix runtime warning when adding log entries
This commit is contained in:
commit
ea90bd3f84
@ -6,8 +6,7 @@ from django.conf import settings
|
|||||||
from django.contrib.admin.models import ADDITION, LogEntry
|
from django.contrib.admin.models import ADDITION, LogEntry
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.contrib.contenttypes.models import ContentType
|
from django.contrib.contenttypes.models import ContentType
|
||||||
|
from django.utils import timezone
|
||||||
from datetime import datetime
|
|
||||||
|
|
||||||
from ..models import Correspondent, Document, Tag
|
from ..models import Correspondent, Document, Tag
|
||||||
|
|
||||||
@ -107,7 +106,7 @@ def set_log_entry(sender, document=None, logging_group=None, **kwargs):
|
|||||||
|
|
||||||
LogEntry.objects.create(
|
LogEntry.objects.create(
|
||||||
action_flag=ADDITION,
|
action_flag=ADDITION,
|
||||||
action_time=datetime.now(),
|
action_time=timezone.now(),
|
||||||
content_type=ct,
|
content_type=ct,
|
||||||
object_id=document.id,
|
object_id=document.id,
|
||||||
user=user,
|
user=user,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user