From 95af4804ade3c197a06b0844d727381923d53fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Ma=C5=82ysa?= Date: Tue, 3 Sep 2024 20:36:52 +0200 Subject: [PATCH] sim: fix editing contest faling with error 500 --- subprojects/sim/src/web_server/old/contests_api.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/sim/src/web_server/old/contests_api.cc b/subprojects/sim/src/web_server/old/contests_api.cc index 7570e429..538bb5b0 100644 --- a/subprojects/sim/src/web_server/old/contests_api.cc +++ b/subprojects/sim/src/web_server/old/contests_api.cc @@ -920,8 +920,8 @@ void Sim::api_contest_edit( if (make_submitters_contestants) { old_mysql .prepare("INSERT IGNORE contest_users(user_id, contest_id, mode) " - "SELECT owner, ?, ? FROM submissions " - "WHERE contest_id=? GROUP BY owner") + "SELECT user_id, ?, ? FROM submissions " + "WHERE contest_id=? GROUP BY user_id") .bind_and_execute(contest_id, EnumVal(OldContestUser::Mode::CONTESTANT), contest_id); }