From a0dfab522e52c095fb382b37153156986333e720 Mon Sep 17 00:00:00 2001
From: Martin Mares <mj@ucw.cz>
Date: Fri, 26 Mar 2021 10:53:48 +0100
Subject: [PATCH] =?UTF-8?q?Import=20bod=C5=AF=20nefungoval=20v=20d=C4=9Ble?=
 =?UTF-8?q?n=C3=BDch=20kolech?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 mo/imports.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mo/imports.py b/mo/imports.py
index 8492e981..fcc4b1d2 100644
--- a/mo/imports.py
+++ b/mo/imports.py
@@ -634,9 +634,9 @@ class PointsImport(Import):
                  .options(joinedload(db.Participation.user)))
 
         if self.contest is not None:
-            query = query.filter(db.Participation.contest == self.contest)
+            query = query.filter(db.Participation.contest_id == self.contest.master_contest_id)
         else:
-            contest_query = sess.query(db.Contest.contest_id).filter_by(round=self.round)
+            contest_query = sess.query(db.Contest.master_contest_id).filter_by(round=self.round)
             query = query.filter(db.Participation.contest_id.in_(contest_query.subquery()))
 
         return query
-- 
GitLab