Unverified Commit 4fff3677 authored by davelopez's avatar davelopez
Browse files

Fix active_histories relationship to exclude archived

parent 0367e0fb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -702,7 +702,7 @@ class User(Base, Dictifiable, RepresentById):
    )
    active_histories = relationship(
        "History",
        primaryjoin=(lambda: (History.user_id == User.id) & (not_(History.deleted))),  # type: ignore[has-type]
        primaryjoin=(lambda: (History.user_id == User.id) & (not_(History.deleted)) & (not_(History.archived))),  # type: ignore[has-type]
        viewonly=True,
        order_by=lambda: desc(History.update_time),  # type: ignore[has-type]
    )