Skip to content

Commit

Permalink
fix: exclude disabled dispenses when getting my expenses
Browse files Browse the repository at this point in the history
Signed-off-by: orertrr <[email protected]>
  • Loading branch information
orertrr committed Jun 25, 2024
1 parent 60df798 commit 469293d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion module/dispense.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ def get_by_ids(ids: list[str]) -> Cursor[dict[str, Any]]:
Return the dispense data in `ids`.
'''
return DispenseDB().find({'_id': { '$in': ids }})
return DispenseDB().find({
'_id': { '$in': ids },
'enable': { '$eq': True }
})

@staticmethod
def update(dispense_id: str, data: dict[str, Any]) -> dict[str, Any] | int:
Expand Down

0 comments on commit 469293d

Please sign in to comment.