From 8631425ff7f85608e560b5da307e481ca506dc34 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Tue, 26 Aug 2025 20:26:56 +0100 Subject: [PATCH] Add "Outdated/invalid review" report category --- app/models/__init__.py | 3 +++ migrations/versions/57b7fbc174cf_.py | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 migrations/versions/57b7fbc174cf_.py diff --git a/app/models/__init__.py b/app/models/__init__.py index aefb5f24..ed4ecb08 100644 --- a/app/models/__init__.py +++ b/app/models/__init__.py @@ -134,6 +134,7 @@ class ReportCategory(enum.Enum): COPYRIGHT = "copyright" USER_CONDUCT = "user_conduct" ILLEGAL_HARMFUL = "illegal_harmful" + REVIEW = "review" APPEAL = "appeal" OTHER = "other" @@ -150,6 +151,8 @@ class ReportCategory(enum.Enum): return lazy_gettext("User behaviour, bullying, or abuse") elif self == ReportCategory.ILLEGAL_HARMFUL: return lazy_gettext("Illegal or harmful content") + elif self == ReportCategory.REVIEW: + return lazy_gettext("Outdated/invalid review") elif self == ReportCategory.APPEAL: return lazy_gettext("Appeal") elif self == ReportCategory.OTHER: diff --git a/migrations/versions/57b7fbc174cf_.py b/migrations/versions/57b7fbc174cf_.py new file mode 100644 index 00000000..7a8280c0 --- /dev/null +++ b/migrations/versions/57b7fbc174cf_.py @@ -0,0 +1,24 @@ +"""empty message + +Revision ID: 57b7fbc174cf +Revises: 1e08d7e4c15d +Create Date: 2025-08-26 19:23:22.446424 + +""" +from alembic import op +from sqlalchemy import text + +# revision identifiers, used by Alembic. +revision = '57b7fbc174cf' +down_revision = '1e08d7e4c15d' +branch_labels = None +depends_on = None + + +def upgrade(): + op.execute(text("COMMIT")) + op.execute(text("ALTER TYPE reportcategory ADD VALUE 'REVIEW' AFTER 'ILLEGAL_HARMFUL'")) + + +def downgrade(): + pass