Users may only report a post once per IP address.
If a user *really* doesn't like a post, they may try to report it multiple times. Users may now only report a single post once per IP address. Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -281,6 +281,11 @@ class Report(models.Model):
|
||||
they are abusing the system.
|
||||
"""
|
||||
|
||||
class Meta:
|
||||
unique_together = [
|
||||
["record", "ip"],
|
||||
]
|
||||
|
||||
# The report that was made by this user
|
||||
record = models.ForeignKey("ReportRecord", on_delete=models.CASCADE)
|
||||
# Reason for this report
|
||||
|
||||
Reference in New Issue
Block a user