chore: make circle data more concise
This commit is contained in:
parent
2077c83f18
commit
41b8e07693
|
|
@ -98,11 +98,9 @@ def circle_feedback_average(
|
|||
if satisfaction is None:
|
||||
continue
|
||||
|
||||
if circle_id in circle_data:
|
||||
circle_data.setdefault(circle_id, {"total": 0, "count": 0})
|
||||
circle_data[circle_id]["total"] += satisfaction
|
||||
circle_data[circle_id]["count"] += 1
|
||||
else:
|
||||
circle_data[circle_id] = {"total": satisfaction, "count": 1}
|
||||
|
||||
for circle_id, data in circle_data.items():
|
||||
details_url = f"/course/{course_slug}/cockpit/feedback/{circle_id}?courseSessionId={course_session_id}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue