Skip to content

Commit

Permalink
Merge branch 'handle-property-migration-conflict-#412' into calculate…
Browse files Browse the repository at this point in the history
…-number-of-spares-#417
  • Loading branch information
joelvdavies committed Dec 4, 2024
2 parents 3025eea + b26a36e commit 530a4c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion inventory_management_system_api/schemas/catalogue_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,5 @@ class CatalogueItemSchema(CreatedModifiedSchemaMixin, CatalogueItemPostSchema):

# Computed
number_of_spares: Optional[int] = Field(
default=None, description="Number of spares currently available within this catalogue item if known"
default=None, description="The number of spares currently available within this catalogue item if known"
)
2 changes: 1 addition & 1 deletion inventory_management_system_api/services/catalogue_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def update(self, catalogue_item_id: str, catalogue_item: CatalogueItemPatchSchem

return self._catalogue_item_repository.update(
catalogue_item_id,
CatalogueItemIn(**{**stored_catalogue_item.model_dump(), **update_data, "number_of_spares": None}),
CatalogueItemIn(**{**stored_catalogue_item.model_dump(), **update_data}),
)

def delete(self, catalogue_item_id: str) -> None:
Expand Down

0 comments on commit 530a4c5

Please sign in to comment.