From 467bd6b5f13f08eb12146e233605a81be212b8fc Mon Sep 17 00:00:00 2001 From: Menci Date: Mon, 10 Jul 2017 21:13:37 +0800 Subject: [PATCH] Add change article problem_id in Problem.changeID() --- models/problem.js | 1 + 1 file changed, 1 insertion(+) diff --git a/models/problem.js b/models/problem.js index ff0347f..ccd881d 100644 --- a/models/problem.js +++ b/models/problem.js @@ -599,6 +599,7 @@ class Problem extends Model { await db.query('UPDATE `problem` SET `id` = ' + id + ' WHERE `id` = ' + this.id); await db.query('UPDATE `judge_state` SET `problem_id` = ' + id + ' WHERE `problem_id` = ' + this.id); await db.query('UPDATE `problem_tag_map` SET `problem_id` = ' + id + ' WHERE `problem_id` = ' + this.id); + await db.query('UPDATE `article` SET `problem_id` = ' + id + ' WHERE `problem_id` = ' + this.id); let Contest = syzoj.model('contest'); let contests = await Contest.all();