Skip to content

Commit

Permalink
Fix groups.delete_entry query
Browse files Browse the repository at this point in the history
  • Loading branch information
Lekuruu committed Dec 29, 2023
1 parent ae89106 commit b00fb5f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion database/repositories/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ def delete_entry(
group_id: int,
session: Session | None = None
) -> int:
return session.query(DBGroupEntry) \
rows = session.query(DBGroupEntry) \
.filter(DBGroupEntry.group_id == group_id) \
.filter(DBGroupEntry.user_id == user_id) \
.delete()
session.commit()
return rows

@session_wrapper
def fetch_one(id: int, session: Session | None = None) -> DBGroup | None:
Expand Down

0 comments on commit b00fb5f

Please sign in to comment.