fix: content search last_published date [FC-0059] (#35195)

* fix: use versioning.last_publish_log for components
* chore: bump openedx-learning to 0.10.1
This commit is contained in:
Jillian
2024-08-02 02:48:31 +09:30
committed by GitHub
parent 2ba6fd5f69
commit 20f7dbda7a
7 changed files with 7 additions and 7 deletions

View File

@@ -206,7 +206,7 @@ class LibraryXBlockMetadata:
"""
Construct a LibraryXBlockMetadata from a Component object.
"""
last_publish_log = authoring_api.get_last_publish(component.pk)
last_publish_log = component.versioning.last_publish_log
return cls(
usage_key=LibraryUsageLocatorV2(

View File

@@ -441,7 +441,7 @@ class TestContentTagChildrenExport(TaggedCourseMixin): # type: ignore[misc]
"""
Test if we can export a library
"""
with self.assertNumQueries(11):
with self.assertNumQueries(8):
tagged_library = build_object_tree_with_objecttags(self.library.key, self.all_library_object_tags)
assert tagged_library == self.expected_library_tagged_xblock