Skip to content

Commit

Permalink
Update enum to remove type ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathangreen committed Nov 26, 2024
1 parent cd2a1ce commit 08ec300
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/palace/manager/sqlalchemy/model/customlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class CustomList(Base):
INIT = "init"
UPDATED = "updated"
REPOPULATE = "repopulate"
auto_update_status_enum = Enum(INIT, UPDATED, REPOPULATE, name="auto_update_status")

__tablename__ = "customlists"
id = Column(Integer, primary_key=True)
Expand Down Expand Up @@ -83,7 +82,9 @@ class CustomList(Base):
auto_update_query = Column(Unicode, nullable=True) # holds json data
auto_update_facets = Column(Unicode, nullable=True) # holds json data
auto_update_last_update = Column(DateTime, nullable=True)
auto_update_status: Mapped[str] = Column(auto_update_status_enum, default=INIT) # type: ignore[assignment]
auto_update_status: Mapped[str] = Column(
Enum(INIT, UPDATED, REPOPULATE, name="auto_update_status"), default=INIT
)

collections: Mapped[list[Collection]] = relationship(
"Collection", secondary="collections_customlists", back_populates="customlists"
Expand Down

0 comments on commit 08ec300

Please sign in to comment.