Add spam to ReportCategory

This commit is contained in:
rubenwardy
2025-09-23 16:25:39 +01:00
parent 28e5f44a30
commit dfa4e5a7a3
2 changed files with 27 additions and 0 deletions

View File

@@ -133,6 +133,7 @@ class ReportCategory(enum.Enum):
ACCOUNT_DELETION = "account_deletion"
COPYRIGHT = "copyright"
USER_CONDUCT = "user_conduct"
SPAM = "spam"
ILLEGAL_HARMFUL = "illegal_harmful"
REVIEW = "review"
APPEAL = "appeal"
@@ -149,6 +150,8 @@ class ReportCategory(enum.Enum):
return lazy_gettext("Copyright infringement / DMCA")
elif self == ReportCategory.USER_CONDUCT:
return lazy_gettext("User behaviour, bullying, or abuse")
elif self == ReportCategory.SPAM:
return lazy_gettext("Spam")
elif self == ReportCategory.ILLEGAL_HARMFUL:
return lazy_gettext("Illegal or harmful content")
elif self == ReportCategory.REVIEW:

View 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