Skip to content

Commit

Permalink
fix: replace group_id with category_id
Browse files Browse the repository at this point in the history
  • Loading branch information
RezenkovD committed Aug 25, 2023
1 parent 4151b31 commit fe57680
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/services/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/services/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fe57680

Please sign in to comment.