We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4580ab0 commit 49bc575Copy full SHA for 49bc575
1 file changed
lms/lms/api.py
@@ -438,6 +438,7 @@ def get_count_of_certified_members(filters=None):
438
@frappe.whitelist(allow_guest=True)
439
def get_certification_categories():
440
categories = []
441
+ seen = set()
442
docs = frappe.get_all(
443
"LMS Certificate",
444
filters={
@@ -448,8 +449,10 @@ def get_certification_categories():
448
449
450
for doc in docs:
451
category = doc.course_title if doc.course_title else doc.batch_title
- if category not in categories:
452
- categories.append({"label": category, "value": category})
+ if not category or category in seen:
453
+ continue
454
+ seen.add(category)
455
+ categories.append({"label": category, "value": category})
456
return categories
457
458
0 commit comments