Skip to content

Commit 2682e49

Browse files
committed
Use default rather than auto_add_now to fix problem with creating
persons with the id set - Legacy-Id: 3429
1 parent 97a6e67 commit 2682e49

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

redesign/person/models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Copyright The IETF Trust 2007, All Rights Reserved
22

3+
import datetime
4+
35
from django.db import models
46
from django.contrib.auth.models import User
57

68
from redesign.person.name import name_parts
79

810
class PersonInfo(models.Model):
9-
time = models.DateTimeField(auto_now_add=True) # When this Person record entered the system
11+
time = models.DateTimeField(default=datetime.datetime.now) # When this Person record entered the system
1012
name = models.CharField(max_length=255, db_index=True) # The normal unicode form of the name. This must be
1113
# set to the same value as the ascii-form if equal.
1214
ascii = models.CharField(max_length=255) # The normal ascii-form of the name.

0 commit comments

Comments
 (0)