diff --git a/inventory_management_system_api/routers/v1/catalogue_category.py b/inventory_management_system_api/routers/v1/catalogue_category.py index 8031311d..a42ab867 100644 --- a/inventory_management_system_api/routers/v1/catalogue_category.py +++ b/inventory_management_system_api/routers/v1/catalogue_category.py @@ -186,8 +186,9 @@ def partial_update_catalogue_category( logger.exception(message) raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=message) from exc except ChildElementsExistError as exc: - message = ("Catalogue category has child elements, so the following fields cannot be updated: " - + ', '.join(CATALOGUE_CATEGORY_WITH_CHILD_NON_EDITABLE_FIELDS)) + message = "Catalogue category has child elements, so the following fields cannot be updated: " + ", ".join( + CATALOGUE_CATEGORY_WITH_CHILD_NON_EDITABLE_FIELDS + ) logger.exception(message) raise HTTPException(status_code=status.HTTP_409_CONFLICT, detail=message) from exc except DuplicateRecordError as exc: diff --git a/inventory_management_system_api/routers/v1/catalogue_item.py b/inventory_management_system_api/routers/v1/catalogue_item.py index 7605fcc2..31d0f752 100644 --- a/inventory_management_system_api/routers/v1/catalogue_item.py +++ b/inventory_management_system_api/routers/v1/catalogue_item.py @@ -162,8 +162,9 @@ def partial_update_catalogue_item( logger.exception(message) raise HTTPException(status_code=status.HTTP_409_CONFLICT, detail=message) from exc except ChildElementsExistError as exc: - message = ("Catalogue item has child elements, so the following fields cannot be updated: " - + ', '.join(CATALOGUE_ITEM_WITH_CHILD_NON_EDITABLE_FIELDS)) + message = "Catalogue item has child elements, so the following fields cannot be updated: " + ", ".join( + CATALOGUE_ITEM_WITH_CHILD_NON_EDITABLE_FIELDS + ) logger.exception(message) raise HTTPException(status_code=status.HTTP_409_CONFLICT, detail=message) from exc except InvalidActionError as exc: diff --git a/test/e2e/test_catalogue_category.py b/test/e2e/test_catalogue_category.py index 55b397c5..a57177cd 100644 --- a/test/e2e/test_catalogue_category.py +++ b/test/e2e/test_catalogue_category.py @@ -993,7 +993,7 @@ def test_partial_update_non_leaf_to_leaf_when_has_child_catalogue_category(self) self.check_patch_catalogue_category_failed_with_detail( 409, "Catalogue category has child elements, so the following fields cannot be updated: " - + ', '.join(CATALOGUE_CATEGORY_WITH_CHILD_NON_EDITABLE_FIELDS) + + ", ".join(CATALOGUE_CATEGORY_WITH_CHILD_NON_EDITABLE_FIELDS), ) def test_partial_update_leaf_all_valid_values_when_no_children(self): @@ -1040,7 +1040,7 @@ def test_partial_update_leaf_to_non_leaf_when_has_child_catalogue_item(self): self.check_patch_catalogue_category_failed_with_detail( 409, "Catalogue category has child elements, so the following fields cannot be updated: " - + ', '.join(CATALOGUE_CATEGORY_WITH_CHILD_NON_EDITABLE_FIELDS) + + ", ".join(CATALOGUE_CATEGORY_WITH_CHILD_NON_EDITABLE_FIELDS), ) def test_partial_update_leaf_properties_when_has_child_catalogue_item(self): @@ -1054,7 +1054,7 @@ def test_partial_update_leaf_properties_when_has_child_catalogue_item(self): self.check_patch_catalogue_category_failed_with_detail( 409, "Catalogue category has child elements, so the following fields cannot be updated: " - + ', '.join(CATALOGUE_CATEGORY_WITH_CHILD_NON_EDITABLE_FIELDS) + + ", ".join(CATALOGUE_CATEGORY_WITH_CHILD_NON_EDITABLE_FIELDS), ) def test_partial_update_leaf_to_non_leaf_with_properties(self): @@ -1099,7 +1099,7 @@ def test_partial_update_is_leaf_with_child_catalogue_category(self): self.check_patch_catalogue_category_failed_with_detail( 409, "Catalogue category has child elements, so the following fields cannot be updated: " - + ', '.join(CATALOGUE_CATEGORY_WITH_CHILD_NON_EDITABLE_FIELDS) + + ", ".join(CATALOGUE_CATEGORY_WITH_CHILD_NON_EDITABLE_FIELDS), ) def test_partial_update_leaf_properties(self): diff --git a/test/e2e/test_catalogue_item.py b/test/e2e/test_catalogue_item.py index 4246ef1b..1816d945 100644 --- a/test/e2e/test_catalogue_item.py +++ b/test/e2e/test_catalogue_item.py @@ -1188,7 +1188,7 @@ def test_partial_update_manufacturer_id_with_children(self): self.check_patch_catalogue_item_failed_with_detail( 409, "Catalogue item has child elements, so the following fields cannot be updated: " - + ', '.join(CATALOGUE_ITEM_WITH_CHILD_NON_EDITABLE_FIELDS) + + ", ".join(CATALOGUE_ITEM_WITH_CHILD_NON_EDITABLE_FIELDS), ) def test_partial_update_manufacturer_id_with_non_existent_id(self): @@ -1465,7 +1465,7 @@ def test_partial_update_properties_with_children(self): self.check_patch_catalogue_item_failed_with_detail( 409, "Catalogue item has child elements, so the following fields cannot be updated: " - + ', '.join(CATALOGUE_ITEM_WITH_CHILD_NON_EDITABLE_FIELDS) + + ", ".join(CATALOGUE_ITEM_WITH_CHILD_NON_EDITABLE_FIELDS), ) def test_partial_update_obsolete_replacement_catalogue_item_id(self):