Skip to content

Commit

Permalink
fix: use get_library_blocks instead of get_library_components
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-canon committed May 8, 2024
1 parent 1a1251e commit d59c614
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,7 @@ def _get_library_tagged_object_and_children(
children=None,
)

library_components = library_api.get_library_components(library_key)
children = [
library_api.LibraryXBlockMetadata.from_component(library_key, component)
for component in library_components
]
children = library_api.get_library_blocks(library_key)

return tagged_library, children

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ def test_build_library_object_tree(self) -> None:
"""
Test if we can export a library
"""
with self.assertNumQueries(8):
with self.assertNumQueries(11):
tagged_library = build_object_tree_with_objecttags(self.library.key, self.all_library_object_tags)

assert tagged_library == self.expected_library_tagged_xblock
Expand Down

0 comments on commit d59c614

Please sign in to comment.