Skip to content

Commit 2081312

Browse files
committed
fix: election type enum used on the Election table model
1 parent f128b1e commit 2081312

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/elections/tables.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from database import Base
1010
from elections.models import (
1111
ElectionStatusEnum,
12+
ElectionTypeEnum,
1213
ElectionUpdateParams,
1314
)
1415
from officers.constants import OfficerPositionEnum
@@ -23,7 +24,7 @@ class Election(Base):
2324
# Slugs are unique identifiers
2425
slug: Mapped[str] = mapped_column(String(MAX_ELECTION_SLUG), primary_key=True)
2526
name: Mapped[str] = mapped_column(String(MAX_ELECTION_NAME), nullable=False)
26-
type: Mapped[str] = mapped_column(String(64), default="general_election")
27+
type: Mapped[ElectionTypeEnum] = mapped_column(String(64), default=ElectionTypeEnum.GENERAL)
2728
datetime_start_nominations: Mapped[datetime] = mapped_column(DateTime(timezone=True), nullable=False)
2829
datetime_start_voting: Mapped[datetime] = mapped_column(DateTime(timezone=True), nullable=False)
2930
datetime_end_voting: Mapped[datetime] = mapped_column(DateTime(timezone=True), nullable=False)

0 commit comments

Comments
 (0)