Reformats report model
This commit is contained in:
parent
999bff4bba
commit
0d2c641d01
2 changed files with 88 additions and 26 deletions
|
@ -17,13 +17,12 @@ class Report(BookWyrmModel):
|
|||
|
||||
class Meta:
|
||||
""" don't let users report themselves """
|
||||
|
||||
constraints = [
|
||||
models.CheckConstraint(
|
||||
check=~Q(reporter=F('user')),
|
||||
name='self_report'
|
||||
)
|
||||
models.CheckConstraint(check=~Q(reporter=F("user")), name="self_report")
|
||||
]
|
||||
|
||||
|
||||
class ReportComment(BookWyrmModel):
|
||||
""" updates on a report """
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue