diff options
author | 2022-09-22 15:35:32 +0300 | |
---|---|---|
committer | 2022-09-22 15:35:32 +0300 | |
commit | 634d0ee92b54e26d920f24bb3c3e96ce527d40d9 (patch) | |
tree | e86832be6ef03a77959fce71e4867adb713b3049 /pydis_site/apps/api/models | |
parent | Minor change to "you will learn" section (diff) | |
parent | Merge #770 - add a collection of keywords per rule (diff) |
Merge branch 'main' into main
Diffstat (limited to 'pydis_site/apps/api/models')
-rw-r--r-- | pydis_site/apps/api/models/bot/infraction.py | 6 |
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=( |