feat: adds APIs to update or delete a container#757
Merged
pomegranited merged 5 commits intobraden/units-apifrom Mar 27, 2025
Merged
feat: adds APIs to update or delete a container#757pomegranited merged 5 commits intobraden/units-apifrom
pomegranited merged 5 commits intobraden/units-apifrom
Conversation
67e0e34 to
426c9dd
Compare
426c9dd to
6482bf4
Compare
6482bf4 to
23fa9df
Compare
23fa9df to
2ef5c83
Compare
Merged
10 tasks
navinkarkera
approved these changes
Mar 27, 2025
Member
navinkarkera
left a comment
There was a problem hiding this comment.
@pomegranited Looks great! Thanks! 👍
- I tested this: (verified tests)
- I read through the code
-
I checked for accessibility issues - Includes documentation
| container_key, | ||
| ) | ||
|
|
||
| return Response({}) |
Member
There was a problem hiding this comment.
NIT: We could set the status_code to 204 for deleted.
navinkarkera
pushed a commit
that referenced
this pull request
Mar 28, 2025
…penedx#36371) * refactor: convert libraries API from attr.s to dataclass, fix types * fix: make corresponding updates to 'search' code * feat: use new version of openedx-learning with containers support * temp: Use opencraft branch of opaquekeys * refactor: Use LibraryElementKey instead of LibraryCollectionKey * refactor: split libraries API & REST API up into smaller modules * feat: new REST API for units in content libraries * feat: python+REST API to get a unit * feat: auto-generate slug/key/ID from title of units * feat: generate search index documents for containers * refactor: rename LibraryElementKey to LibraryItemKey * fix: lint error * feat: adds new units to search index on create/update and when running reindex_studio. Updates requirements for openedx-events and openedx-learning to support these changes. * fix: pylint * fix: temp requirement * fix: search index container events/tasks * feat: add get_library_container_usage_key to libraries API and use it when search indexing containers * fix: index all containers during reindex_studio * chore: bump openedx-events requirement * fix: address review comments * chore: bumps openedx-learning to 0.19.1 * fix: rename api method to library_container_locator since container keys are locators, not usage keys * chore: bumps opaque-keys dependency * test: fix misnamed unit_usage_key * feat: adds APIs to update or delete a container (#757) * feat: adds python and REST APIs to update a container's display_name * refactor: adds _get_container method to api to reduce code duplication * feat: adds python and REST APIs to delete a container * test: add container permission tests --------- Co-authored-by: XnpioChV <[email protected]> Co-authored-by: Jillian Vogel <[email protected]> Co-authored-by: Rômulo Penido <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finishes the CRUD API started in openedx#36371.
Private ref: FAL-4052
Testing instructions
Should be enough to do a code review and careful check of the tests to ensure they validate the desired behaviour for these new methods.