Add spam to ReportCategory
This commit is contained in:
@@ -133,6 +133,7 @@ class ReportCategory(enum.Enum):
|
|||||||
ACCOUNT_DELETION = "account_deletion"
|
ACCOUNT_DELETION = "account_deletion"
|
||||||
COPYRIGHT = "copyright"
|
COPYRIGHT = "copyright"
|
||||||
USER_CONDUCT = "user_conduct"
|
USER_CONDUCT = "user_conduct"
|
||||||
|
SPAM = "spam"
|
||||||
ILLEGAL_HARMFUL = "illegal_harmful"
|
ILLEGAL_HARMFUL = "illegal_harmful"
|
||||||
REVIEW = "review"
|
REVIEW = "review"
|
||||||
APPEAL = "appeal"
|
APPEAL = "appeal"
|
||||||
@@ -149,6 +150,8 @@ class ReportCategory(enum.Enum):
|
|||||||
return lazy_gettext("Copyright infringement / DMCA")
|
return lazy_gettext("Copyright infringement / DMCA")
|
||||||
elif self == ReportCategory.USER_CONDUCT:
|
elif self == ReportCategory.USER_CONDUCT:
|
||||||
return lazy_gettext("User behaviour, bullying, or abuse")
|
return lazy_gettext("User behaviour, bullying, or abuse")
|
||||||
|
elif self == ReportCategory.SPAM:
|
||||||
|
return lazy_gettext("Spam")
|
||||||
elif self == ReportCategory.ILLEGAL_HARMFUL:
|
elif self == ReportCategory.ILLEGAL_HARMFUL:
|
||||||
return lazy_gettext("Illegal or harmful content")
|
return lazy_gettext("Illegal or harmful content")
|
||||||
elif self == ReportCategory.REVIEW:
|
elif self == ReportCategory.REVIEW:
|
||||||
|
|||||||
24
migrations/versions/8f55dfbec825_.py
Normal file
24
migrations/versions/8f55dfbec825_.py
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
"""empty message
|
||||||
|
|
||||||
|
Revision ID: 8f55dfbec825
|
||||||
|
Revises: 242fd82077bb
|
||||||
|
Create Date: 2025-09-23 15:21:06.445012
|
||||||
|
|
||||||
|
"""
|
||||||
|
from alembic import op
|
||||||
|
from sqlalchemy import text
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = '8f55dfbec825'
|
||||||
|
down_revision = '242fd82077bb'
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
op.execute(text("COMMIT"))
|
||||||
|
op.execute(text("ALTER TYPE reportcategory ADD VALUE 'SPAM' AFTER 'USER_CONDUCT'"))
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
pass
|
||||||
Reference in New Issue
Block a user