aboutsummaryrefslogtreecommitdiffstats
path: root/api/models.py
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2019-01-07 22:36:41 +0100
committerGravatar Johannes Christ <[email protected]>2019-01-07 22:36:41 +0100
commit79f24f30372d4ac5d14ad0c964ff55e3d3b03809 (patch)
tree7e651759eedd17c7200ee78ab2d9fa45f81e938f /api/models.py
parentUse proper field name in `tag_embed_validator`. (diff)
Allow custom `inserted_at` infraction field for now.
Diffstat (limited to 'api/models.py')
-rw-r--r--api/models.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/api/models.py b/api/models.py
index 480dba3d..176b7c46 100644
--- a/api/models.py
+++ b/api/models.py
@@ -1,3 +1,4 @@
+import datetime
from operator import itemgetter
from django.contrib.postgres import fields as pgfields
@@ -249,7 +250,7 @@ class Infraction(ModelReprMixin, models.Model):
("superstar", "Superstar")
)
inserted_at = models.DateTimeField(
- auto_now_add=True,
+ default=datetime.datetime.utcnow,
help_text="The date and time of the creation of this infraction."
)
expires_at = models.DateTimeField(