From 395b9876447a46bf7a4ee7f13a647fee1fb8ee39 Mon Sep 17 00:00:00 2001 From: Mattias Thall Date: Wed, 27 May 2026 02:03:39 +0200 Subject: [PATCH] Add last_discovery_run to UserSettings model Column was added via SQL migration but missing from the SQLAlchemy model definition, causing AttributeError when the discovery status endpoint accesses s.last_discovery_run. Co-Authored-By: Claude Sonnet 4.6 --- backend/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/models.py b/backend/models.py index c2110c7..6761fe8 100644 --- a/backend/models.py +++ b/backend/models.py @@ -124,6 +124,7 @@ class UserSettings(Base): use_oauth2 = Column(Boolean, default=False) sync_interval_hours = Column(Integer, default=0) # 0 = disabled, 6/12/24 = auto-sync interval subtitle_langs = Column(String, default="") # "" = disabled, "en", "en,sv", etc. + last_discovery_run = Column(DateTime, nullable=True, default=None) class DiscoveryQueue(Base):