mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-22 23:31:12 +02:00
CRITICAL FIX: Add missing SQLAlchemy relationships to SearchSpace class
- Added search_source_connectors relationship (back_populates from SearchSourceConnector) - Added llm_configs relationship (back_populates from LLMConfig) - Added user_preferences relationship (back_populates from UserSearchSpacePreference) - Prevents SQLAlchemy InvalidRequestError on application startup - Fixes broken ORM mappings that would crash the entire application This resolves the critical issue where SQLAlchemy could not find the required relationships, preventing the application from starting.
This commit is contained in:
parent
b07ce72f05
commit
2facfd7a8d
1 changed files with 18 additions and 0 deletions
|
|
@ -260,6 +260,24 @@ class SearchSpace(BaseModel, TimestampMixin):
|
|||
order_by="ConnectorSchedule.id",
|
||||
cascade="all, delete-orphan",
|
||||
)
|
||||
search_source_connectors = relationship(
|
||||
"SearchSourceConnector",
|
||||
back_populates="search_space",
|
||||
order_by="SearchSourceConnector.id",
|
||||
cascade="all, delete-orphan",
|
||||
)
|
||||
llm_configs = relationship(
|
||||
"LLMConfig",
|
||||
back_populates="search_space",
|
||||
order_by="LLMConfig.id",
|
||||
cascade="all, delete-orphan",
|
||||
)
|
||||
user_preferences = relationship(
|
||||
"UserSearchSpacePreference",
|
||||
back_populates="search_space",
|
||||
order_by="UserSearchSpacePreference.id",
|
||||
cascade="all, delete-orphan",
|
||||
)
|
||||
|
||||
|
||||
class SearchSourceConnector(BaseModel, TimestampMixin):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue