oprava chyby

This commit is contained in:
Daniel Bulant 2021-10-24 19:51:30 +02:00
parent e23805c4c6
commit bfbc8716fa

View file

@ -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({