Skip to content

Commit 7081488

Browse files
committed
fix: rename api method to library_container_locator
since container keys are locators, not usage keys
1 parent 6bdf39f commit 7081488

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

openedx/core/djangoapps/content/search/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ def index_container_batch(batch, num_done, library_key) -> int:
481481
docs = []
482482
for container in batch:
483483
try:
484-
container_key = lib_api.library_container_usage_key(
484+
container_key = lib_api.library_container_locator(
485485
library_key,
486486
container,
487487
)

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"get_container",
3131
"create_container",
3232
"get_container_children",
33-
"library_container_usage_key",
33+
"library_container_locator",
3434
]
3535

3636

@@ -52,7 +52,7 @@ def from_container(cls, library_key, container: authoring_models.Container, asso
5252
Construct a ContainerMetadata object from a Container object.
5353
"""
5454
last_publish_log = container.versioning.last_publish_log
55-
container_key = library_container_usage_key(
55+
container_key = library_container_locator(
5656
library_key,
5757
container=container,
5858
)
@@ -87,7 +87,7 @@ def from_container(cls, library_key, container: authoring_models.Container, asso
8787
)
8888

8989

90-
def library_container_usage_key(
90+
def library_container_locator(
9191
library_key: LibraryLocatorV2,
9292
container: authoring_models.Container,
9393
) -> LibraryContainerLocator:

0 commit comments

Comments
 (0)