Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/pages/CertifiedParticipants.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
v-model="currentCategory"
:options="categories.data"
:placeholder="__('Category')"
@change="updateParticipants()"
@update:modelValue="updateParticipants()"
/>
</div>
</div>
Expand Down
7 changes: 5 additions & 2 deletions lms/lms/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@ def get_count_of_certified_members(filters=None):
@frappe.whitelist(allow_guest=True)
def get_certification_categories():
categories = []
seen = set()
docs = frappe.get_all(
"LMS Certificate",
filters={
Expand All @@ -448,9 +449,11 @@ def get_certification_categories():

for doc in docs:
category = doc.course_title if doc.course_title else doc.batch_title
if category not in categories:
categories.append(category)
if not category or category in seen:
continue

seen.add(category)
categories.append({"label": category, "value": category})
return categories


Expand Down