-
Notifications
You must be signed in to change notification settings - Fork 2
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
Refactor/patch object on save #341
Conversation
how is this different than #340 ? |
Requires CSCfi/metadata-submitter-frontend#626 in front-end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we add the object in the folder when creating, should we still allow patching https://github.com/CSCfi/metadata-submitter/blob/develop/metadata_backend/api/handlers/folder.py#L38 metadataObjects
and drafts
when PATCH folder ?
changed the branch name because realized that we are not patching on the update. This obviously closed the PR. |
If e.g. title of an object will change i think it should be updated to the folder
And actualy the old branch name was correct if we will be updating folder on object patch. :D |
Good point, I think front-end does a PATCH or PUT for that I don't remember we need to check. |
281414d
to
b236fce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good.
please add changes to CHANGELOG.md
Filename is needed for db entry (fileName and displayTitle) when new object created from file and is assigned to folder.
Moving responsibility for adding newly created object to a folder from frontend to object endpoint. Now folder id is required query parameter with POST object/. Tests updated.
Update spelling wordlist.
5558798
to
48fb095
Compare
Description
Move responsibility of adding an object to a folder on object creation and update from frontend to object endpoint.
###Related issues
Closes #335
Type of change
Frontend now should add folder ID as a query parameter with object POST.
Changes Made
Folder id is now required query param with object POST.
A folder is patched after an object is created and updated.
Adds extraction of title for folder's objects display title.
Testing