From 08ec300ee1fdb9f6f1f80a4d8c65e0e224609d8f Mon Sep 17 00:00:00 2001 From: Jonathan Green Date: Tue, 26 Nov 2024 13:50:20 -0400 Subject: [PATCH] Update enum to remove type ignore --- src/palace/manager/sqlalchemy/model/customlist.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/palace/manager/sqlalchemy/model/customlist.py b/src/palace/manager/sqlalchemy/model/customlist.py index c5500bec7..f6b5adb57 100644 --- a/src/palace/manager/sqlalchemy/model/customlist.py +++ b/src/palace/manager/sqlalchemy/model/customlist.py @@ -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) @@ -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"