File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 99from database import Base
1010from elections .models import (
1111 ElectionStatusEnum ,
12+ ElectionTypeEnum ,
1213 ElectionUpdateParams ,
1314)
1415from 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 )
You can’t perform that action at this time.
0 commit comments