From 011e9956ae4ab54f8eff324dfe598d6aeb175b96 Mon Sep 17 00:00:00 2001
From: Martin Mares <mj@ucw.cz>
Date: Wed, 1 Dec 2021 23:32:27 +0100
Subject: [PATCH] =?UTF-8?q?p-score:=20Kraje=20t=C5=99=C3=ADd=C3=ADme=20abe?=
 =?UTF-8?q?cedn=C4=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 bin/p-score | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bin/p-score b/bin/p-score
index d1e69f0f..56bc73ab 100755
--- a/bin/p-score
+++ b/bin/p-score
@@ -2,6 +2,7 @@
 # Generátor výsledkové listiny pro MO-P
 
 import argparse
+import locale
 from sqlalchemy.orm import joinedload
 
 import mo.db as db
@@ -153,7 +154,7 @@ contests = (sess.query(db.Contest)
             .options(joinedload(db.Contest.place))
             .all())
 assert contests
-contests.sort(key=lambda c: c.place.get_code())
+contests.sort(key=lambda c: locale.strxfrm(c.place.name))
 
 results = get_results(round, contests)
 write_tex(round, tasks, contests, results)
-- 
GitLab