Skip to content

Commit 2cb3ab7

Browse files
committed
fix: build locator with container_code
1 parent cc6eac9 commit 2cb3ab7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

openedx/core/djangoapps/content_libraries/api/container_metadata.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,9 @@ def library_container_locator(
365365
container_type_code = content_api.get_container_type_code_of(container)
366366
if container_type_code not in LIBRARY_ALLOWED_CONTAINER_TYPES:
367367
raise ValueError(f"Unsupported container type for content libraries: {container!r}")
368-
369-
# TODO: verify whether container_id should use entity_ref (opaque) or container_code (local slug).
370-
return LibraryContainerLocator(library_key, container_type=container_type_code, container_id=container.entity_ref)
368+
return LibraryContainerLocator(
369+
library_key, container_type=container_type_code, container_id=container.container_code,
370+
)
371371

372372

373373
def get_container_from_key(container_key: LibraryContainerLocator, include_deleted=False) -> Container:

0 commit comments

Comments
 (0)