aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api/models
diff options
context:
space:
mode:
authorGravatar Amrou Bellalouna <[email protected]>2023-03-12 09:46:43 +0100
committerGravatar GitHub <[email protected]>2023-03-12 09:46:43 +0100
commit306855f304b1cf9683b08abfd8fa73e0a23bf03a (patch)
tree8d1dea591cff7c97e2cde03338e3a81a7ba184ae /pydis_site/apps/api/models
parentMerge pull request #896 from python-discord/dependabot/pip/django-environ-0.10.0 (diff)
parentReplace CharField with URLField and set default to None (diff)
Merge pull request #824 from python-discord/vivek/add-jump-url-field
Add jump_url field to infraction model
Diffstat (limited to 'pydis_site/apps/api/models')
-rw-r--r--pydis_site/apps/api/models/bot/infraction.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/pydis_site/apps/api/models/bot/infraction.py b/pydis_site/apps/api/models/bot/infraction.py
index 218ee5ec..660f1cb4 100644
--- a/pydis_site/apps/api/models/bot/infraction.py
+++ b/pydis_site/apps/api/models/bot/infraction.py
@@ -69,6 +69,15 @@ class Infraction(ModelReprMixin, models.Model):
help_text="Whether a DM was sent to the user when infraction was applied."
)
+ jump_url = models.URLField(
+ default=None,
+ null=True,
+ max_length=88,
+ help_text=(
+ "The jump url to message invoking the infraction."
+ )
+ )
+
def __str__(self):
"""Returns some info on the current infraction, for display purposes."""
s = f"#{self.id}: {self.type} on {self.user_id}"