Skip to content

Commit

Permalink
Merge pull request #218 from orertrr/exclude-disabled-dispense
Browse files Browse the repository at this point in the history
Exclude disabled dispenses when retrieving my expense
  • Loading branch information
toomore authored Jun 26, 2024
2 parents 9394ba7 + 469293d commit c1a5c67
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 c1a5c67

Please sign in to comment.