aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api/models/bot
diff options
context:
space:
mode:
authorGravatar ChrisJL <[email protected]>2022-08-04 09:29:05 +0100
committerGravatar GitHub <[email protected]>2022-08-04 09:29:05 +0100
commit1122f5abfccffb99c86673c0ed23ac6713dc3c99 (patch)
treefed9ef2740c58f02d07aed10fe0c8c509a17d848 /pydis_site/apps/api/models/bot
parentRun Migrations For Tests (diff)
parentMerge pull request #751 from python-discord/add-infraction-last-applied (diff)
Merge branch 'main' into speedup-tests
Diffstat (limited to 'pydis_site/apps/api/models/bot')
-rw-r--r--pydis_site/apps/api/models/bot/infraction.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pydis_site/apps/api/models/bot/infraction.py b/pydis_site/apps/api/models/bot/infraction.py
index c9303024..218ee5ec 100644
--- a/pydis_site/apps/api/models/bot/infraction.py
+++ b/pydis_site/apps/api/models/bot/infraction.py
@@ -23,6 +23,12 @@ class Infraction(ModelReprMixin, models.Model):
default=timezone.now,
help_text="The date and time of the creation of this infraction."
)
+ last_applied = models.DateTimeField(
+ # This default is for backwards compatibility with bot versions
+ # that don't explicitly give a value.
+ default=timezone.now,
+ help_text="The date and time of when this infraction was last applied."
+ )
expires_at = models.DateTimeField(
null=True,
help_text=(