From ce5e2a3786df79730b215934b9cc54d087cbbefa Mon Sep 17 00:00:00 2001
From: Martin Mares <mj@ucw.cz>
Date: Mon, 11 Oct 2021 13:28:59 +0200
Subject: [PATCH] =?UTF-8?q?Povy=C5=A1ov=C3=A1n=C3=AD=20na=20orga=20odm?=
 =?UTF-8?q?=C3=ADtalo=20=C3=BA=C4=8Dastn=C3=ADky=20s=20=C3=BA=C4=8Dast?=
 =?UTF-8?q?=C3=AD=20ve=20star=C5=A1=C3=ADch=20ro=C4=8Dn=C3=ADc=C3=ADch?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 mo/users.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mo/users.py b/mo/users.py
index 851ddf09..32c858ce 100644
--- a/mo/users.py
+++ b/mo/users.py
@@ -61,6 +61,7 @@ def change_user_to_org(user, reason: str):
     if (db.get_session().query(db.Participation, db.Contest, db.Round)
             .select_from(db.Participation)
             .join(db.Contest)
+            .join(db.Round)
             .filter(db.Participation.user == user)
             .filter(db.Round.year == config.CURRENT_YEAR)
             .count()):
-- 
GitLab