Skip to content

Commit 769ecf2

Browse files
committed
🐛 fix: sort questions by original qi index (issue #3)
1 parent b8a4f6e commit 769ecf2

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

app/handler/question.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,4 @@ async def save_questions(
106106
logger.success("finished")
107107
return questions
108108
except Exception as e:
109-
logger.error(
110-
f"failed to fill questions fields for {contest_name=} {questions=} {e=}"
111-
)
109+
logger.error(f"failed to fill questions fields for {contest_name=} {e=}")

client/src/pages/Predicted/PredictedRecords.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { trendColorsHSL } from "../../utils";
1818
const QuestionFinishedChart = ({ questionsRaw }) => {
1919
// console.log("QuestionFinishedChart questionsRaw=", questionsRaw);
2020
const questions = [...questionsRaw].sort((a, b) =>
21-
a.credit === b.credit ? a.question_id - b.question_id : a.credit - b.credit
21+
a.credit === b.credit ? a.qi - b.qi : a.credit - b.credit
2222
);
2323

2424
const real_time_count = [["Minute", "Question", "Count"]];

0 commit comments

Comments
 (0)