From 734f596e1a5cd6bef4a3033db658f6c0c116464f Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Wed, 3 Jun 2026 07:29:03 -0600 Subject: [PATCH] update --- flowchart/views/admin.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/flowchart/views/admin.py b/flowchart/views/admin.py index 3daed92..06ba7d5 100644 --- a/flowchart/views/admin.py +++ b/flowchart/views/admin.py @@ -94,12 +94,12 @@ class FlowchartStatisticsAPI(APIView): criteria_counts = Counter() criteria_max = {} - suggestions_texts = [] + feedback_texts = [] for row in submissions.values_list( - "ai_criteria_details", "ai_suggestions" + "ai_criteria_details", "ai_feedback" ).iterator(): - details, suggestions = row + details, feedback = row if details and isinstance(details, dict): for key, val in details.items(): if isinstance(val, dict) and "score" in val: @@ -107,8 +107,8 @@ class FlowchartStatisticsAPI(APIView): criteria_counts[key] += 1 if key not in criteria_max: criteria_max[key] = val.get("max", 100) - if suggestions: - suggestions_texts.append(suggestions) + if feedback: + feedback_texts.append(feedback) criteria_averages = {} for key in criteria_totals: @@ -131,8 +131,8 @@ class FlowchartStatisticsAPI(APIView): real_name = get_real_name(uname, class_name) unaccepted.append({"username": uname, "real_name": real_name}) - # 5. Word cloud from suggestions - word_freq = self._build_word_frequencies(suggestions_texts) + # 5. Word cloud from feedback + word_freq = self._build_word_frequencies(feedback_texts) return self.success({ "total_count": total_count,