Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partially edit catalogue categories #62

Merged
merged 16 commits into from
Sep 29, 2023

Conversation

VKTB
Copy link
Collaborator

@VKTB VKTB commented Sep 15, 2023

Description

This PR creates a catalogue items endpoint (accessible at /v1/catalogue-categories/{catalogue_category_id}) to which PATCH requests can be sent to partially update a catalogue category by ID. The endpoint requires only the fields that have changed to be supplied. For example, if the name needs to be changed then only the name field and corresponding value should be supplied.

Testing instructions

  • Review code
  • Check Actions build

Agile board tracking

closes #3

@VKTB VKTB marked this pull request as ready for review September 20, 2023 14:57
@VKTB VKTB linked an issue Sep 20, 2023 that may be closed by this pull request
3 tasks
@VKTB VKTB mentioned this pull request Sep 21, 2023
10 tasks
Base automatically changed from endpoint-for-reading-catalogue-items-#47 to develop September 21, 2023 11:53
@VKTB
Copy link
Collaborator Author

VKTB commented Sep 22, 2023

ff5f256 addresses the change requested in #45 (comment).

@VKTB
Copy link
Collaborator Author

VKTB commented Sep 27, 2023

Supplying a list of catalogue item properties in a PATCH request for a catalogue category that is not a leaf returns 500 error. The catalogue category gets updated in the database which should not happen because a non-leaf category cannot have catalogue item properties.

@joshuadkitenge
Copy link
Collaborator

Can you add error checking for the Manufacturer URL to test if it's a valid URL? I've had to add this in the frontend because if the URL is invalid and a user clicks on it, it appends the invalid URL to the current URL. This would also needs to be done in #67.

@VKTB
Copy link
Collaborator Author

VKTB commented Sep 28, 2023

Supplying a list of catalogue item properties in a PATCH request for a catalogue category that is not a leaf returns 500 error. The catalogue category gets updated in the database which should not happen because a non-leaf category cannot have catalogue item properties.

Addressed in 7d82c8d

Can you add error checking for the Manufacturer URL to test if it's a valid URL? I've had to add this in the frontend because if the URL is invalid and a user clicks on it, it appends the invalid URL to the current URL. This would also needs to be done in #67.

Addressed in f53490a and 6f6990d

Copy link
Collaborator

@joshuadkitenge joshuadkitenge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@VKTB VKTB merged commit 3a1d6cb into develop Sep 29, 2023
3 checks passed
@VKTB VKTB deleted the endpoint-for-editing-catalogue-category-#3 branch September 29, 2023 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

As an operator/admin, I want to be able to edit catalogue categories
2 participants