Commit 6caa37c7 authored by Robert Czechowski's avatar Robert Czechowski

Fix delete_participation use an ambiguous SQL statement

parent afbbefdd
......@@ -1285,7 +1285,7 @@ impl MedalConnection for Connection {
fn delete_participation(&self, user_id: i32, contest_id: i32) {
let query = "DELETE FROM submission
WHERE id IN (
SELECT id FROM submission
SELECT submission.id FROM submission
JOIN task ON submission.task = task.id
JOIN taskgroup ON task.taskgroup = taskgroup.id
WHERE taskgroup.contest = $1
......
......@@ -1397,7 +1397,7 @@ impl MedalConnection for Connection {
fn delete_participation(&self, user_id: i32, contest_id: i32) {
let query = "DELETE FROM submission
WHERE id IN (
SELECT id FROM submission
SELECT submission.id FROM submission
JOIN task ON submission.task = task.id
JOIN taskgroup ON task.taskgroup = taskgroup.id
WHERE taskgroup.contest = $1
......
......@@ -1397,7 +1397,7 @@ impl MedalConnection for Connection {
fn delete_participation(&self, user_id: i32, contest_id: i32) {
let query = "DELETE FROM submission
WHERE id IN (
SELECT id FROM submission
SELECT submission.id FROM submission
JOIN task ON submission.task = task.id
JOIN taskgroup ON task.taskgroup = taskgroup.id
WHERE taskgroup.contest = ?1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment