From a1882c20d2ff3f73e560734d62437dd82a925f4e Mon Sep 17 00:00:00 2001 From: imnotkind Date: Sat, 30 Mar 2019 00:42:31 +0900 Subject: [PATCH 1/2] problem sort by point & title --- src/problem/helpers/problem_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/problem/helpers/problem_info.py b/src/problem/helpers/problem_info.py index cf01445..786e63d 100644 --- a/src/problem/helpers/problem_info.py +++ b/src/problem/helpers/problem_info.py @@ -36,7 +36,7 @@ def get_user_problem_info(user, problem_instance): def get_problem_list_info(problem_list, user): - problem_instances = problem_list.probleminstance_set.all() + problem_instances = problem_list.probleminstance_set.order_by('points','problem__title') problem_info = [] user_score = 0 for problem_instance in problem_instances: From 149fb8bf350b44324bf9e9bf22bb0879fe96fbb0 Mon Sep 17 00:00:00 2001 From: imnotkind Date: Sat, 30 Mar 2019 00:45:19 +0900 Subject: [PATCH 2/2] CI fix --- src/problem/helpers/problem_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/problem/helpers/problem_info.py b/src/problem/helpers/problem_info.py index 786e63d..a662fdd 100644 --- a/src/problem/helpers/problem_info.py +++ b/src/problem/helpers/problem_info.py @@ -36,7 +36,7 @@ def get_user_problem_info(user, problem_instance): def get_problem_list_info(problem_list, user): - problem_instances = problem_list.probleminstance_set.order_by('points','problem__title') + problem_instances = problem_list.probleminstance_set.order_by('points', 'problem__title') problem_info = [] user_score = 0 for problem_instance in problem_instances: