Skip to content

Commit

Permalink
Addressing some comments #417
Browse files Browse the repository at this point in the history
  • Loading branch information
joelvdavies committed Jan 2, 2025
1 parent 64abc88 commit 4ab3642
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,10 @@ def update_number_of_spares(
Updates the `number_of_spares` field using a given catalogue item id filter.
:param catalogue_item_id: The ID of the catalogue item to update or `None` if updating all.
:param number_of_spares: New number of spares to update to.
:param session: PyMongo ClientSession to use for database operations
:param number_of_spares: New number of spares to update to. A value of `None` can be used to write lock
the involved documents when updating within a transaction as the actual value will be
assigned later but the documents should be write locked immediately.
:param session: PyMongo ClientSession to use for database operations.
"""

if catalogue_item_id is not None:
Expand Down
2 changes: 1 addition & 1 deletion inventory_management_system_api/repositories/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def count_with_usage_status_ids_in(
Counts the number of items within a catalogue item with a `usage_status_id` contained within the given list.
:param catalogue_item_id: ID of the catalogue item for which items should be counted.
:param usage_status_id: List of usage status IDs which should be included in the count.
:param usage_status_ids: List of usage status IDs which should be included in the count.
:param session: PyMongo ClientSession to use for database operations.
:return: Number of items counted.
"""
Expand Down
2 changes: 1 addition & 1 deletion test/unit/repositories/test_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ def call_count_with_usage_status_ids_in(
"""Calls the `ItemRepo` `count_with_usage_status_ids_in` method.
:param catalogue_item_id: ID of the catalogue item for which items should be counted.
:param usage_status_id: List of usage status IDs which should be included in the count.
:param usage_status_ids: List of usage status IDs which should be included in the count.
"""

self._count_with_usage_status_ids_in_catalogue_item_id = catalogue_item_id
Expand Down

0 comments on commit 4ab3642

Please sign in to comment.