From bfbc8716fa1986bc0806b877c01c25503521aaac Mon Sep 17 00:00:00 2001 From: Daniel Bulant Date: Sun, 24 Oct 2021 19:51:30 +0200 Subject: [PATCH] oprava chyby --- utils/models/student.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/utils/models/student.js b/utils/models/student.js index 245c55a..0c072d1 100644 --- a/utils/models/student.js +++ b/utils/models/student.js @@ -5,17 +5,10 @@ const ssps = require("../ssps-server"); const Group = require("./group"); class Student extends Model { - /** @type {string} */ - id; - /** @type {string} */ - name; - /** @type {string} */ - classId; - async setClassID(classId, force) { if(this.classId === classId && !force) return; this.classId = classId; - await this.save({ fields: "classId"}); + await this.save({ fields: ["classId"] }); const [groups, mainGroup] = await Promise.all([ this.getGroups(), Group.findOne({