From fe57680e65ce552eaf185ab61c11fabe9fcedc09 Mon Sep 17 00:00:00 2001 From: RezenkovD Date: Fri, 25 Aug 2023 18:41:54 +0300 Subject: [PATCH] fix: replace group_id with category_id --- src/services/group.py | 2 +- src/services/user.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/group.py b/src/services/group.py index 1417338..a5a5096 100644 --- a/src/services/group.py +++ b/src/services/group.py @@ -62,7 +62,7 @@ def group_history(db: Session, user_id: int, group_id: int) -> List[GroupHistory CategoryGroup, and_( Expense.category_id == CategoryGroup.category_id, - Expense.group_id == CategoryGroup.category_id, + Expense.group_id == CategoryGroup.group_id, ), ) .join(Category, Expense.category_id == Category.id) diff --git a/src/services/user.py b/src/services/user.py index efa8bb7..8a1d249 100644 --- a/src/services/user.py +++ b/src/services/user.py @@ -232,7 +232,7 @@ def user_history(user_id: int) -> List[UserHistory]: CategoryGroup, and_( Expense.category_id == CategoryGroup.category_id, - Expense.group_id == CategoryGroup.category_id, + Expense.group_id == CategoryGroup.group_id, ), ) .join(Group, Expense.group_id == Group.id)