mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-21 18:08:21 +02:00
default=timezone.default is better than auto_now_add=True
This commit is contained in:
@ -5,6 +5,7 @@ from datetime import timedelta, datetime
|
||||
from django.contrib.auth.models import User
|
||||
from django.db import models
|
||||
from django.db.models import Q
|
||||
from django.utils import timezone
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from rest_framework.exceptions import ValidationError
|
||||
from note.models import NoteUser, Transaction
|
||||
@ -118,7 +119,7 @@ class Entry(models.Model):
|
||||
)
|
||||
|
||||
time = models.DateTimeField(
|
||||
auto_now_add=True,
|
||||
default=timezone.now,
|
||||
verbose_name=_("entry time"),
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user