Skip to content

Commit

Permalink
Fixes backend flake introduced by oppia#15626 (oppia#15731)
Browse files Browse the repository at this point in the history
* Fix get_topic_ids_from_subtopic_page_ids

* Fix

* Fix
  • Loading branch information
gp201 authored Jul 16, 2022
1 parent 8d8a5c3 commit 0e69c2b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions core/domain/subtopic_page_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,18 +329,21 @@ def delete_subtopic_page(
def get_topic_ids_from_subtopic_page_ids(
subtopic_page_ids: List[str]
) -> List[str]:
"""Returns the topic ids corresponding to the given subtopic page ids.
"""Returns the topic ids corresponding to the given set of subtopic page
ids.
Args:
subtopic_page_ids: list(str). The ids of the subtopic pages.
Returns:
list(str). The topic ids corresponding to the given subtopic page ids.
The returned list of topic ids is deduplicated and ordered
alphabetically.
"""
return list({
return sorted(list({
subtopic_page_id.split(':')[0] for subtopic_page_id in
subtopic_page_ids
})
}))


def get_multi_users_subtopic_pages_progress(
Expand Down

0 comments on commit 0e69c2b

Please sign in to comment.