From 7eb45c8b93d3539ada2339caf88281660a574ec1 Mon Sep 17 00:00:00 2001 From: jessikitty Date: Wed, 28 Jan 2026 08:23:46 +1100 Subject: [PATCH] Fix User-Chore relationship with lazy loading --- backend/app/models/user.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/app/models/user.py b/backend/app/models/user.py index 11f1d76..99e3001 100644 --- a/backend/app/models/user.py +++ b/backend/app/models/user.py @@ -18,5 +18,5 @@ class User(Base): created_at = Column(DateTime, default=datetime.utcnow) updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow) - # Relationships - chores = relationship("Chore", back_populates="assigned_user") + # Relationships (lazy loaded to avoid circular imports) + chores = relationship("Chore", back_populates="assigned_user", lazy="select")