Skip to content

Commit

Permalink
fix: assert collection doc have unique id
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Sep 11, 2024
1 parent e6b469d commit 1738447
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/content/search/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def searchable_doc_for_collection(collection) -> dict:
found using faceted search.
"""
doc = {
Fields.id: collection.key,
Fields.id: collection.id,
Fields.type: DocType.collection,
Fields.display_name: collection.title,
Fields.description: collection.description,
Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/content/search/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def setUp(self):
description="my collection description"
)
self.collection_dict = {
'id': 'MYCOL',
'id': self.collection.id,
'type': 'collection',
'display_name': 'my_collection',
'description': 'my collection description',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def test_collection_with_no_library(self):
)
doc = searchable_doc_for_collection(collection)
assert doc == {
"id": "MYCOL",
"id": collection.id,
"type": "collection",
"display_name": "my_collection",
"description": "my collection description",
Expand Down

0 comments on commit 1738447

Please sign in to comment.