mirror of
https://github.com/danbulant/ssps-bot
synced 2026-05-26 21:31:55 +00:00
oprava chyby
This commit is contained in:
parent
e23805c4c6
commit
bfbc8716fa
1 changed files with 1 additions and 8 deletions
|
|
@ -5,17 +5,10 @@ const ssps = require("../ssps-server");
|
||||||
const Group = require("./group");
|
const Group = require("./group");
|
||||||
|
|
||||||
class Student extends Model {
|
class Student extends Model {
|
||||||
/** @type {string} */
|
|
||||||
id;
|
|
||||||
/** @type {string} */
|
|
||||||
name;
|
|
||||||
/** @type {string} */
|
|
||||||
classId;
|
|
||||||
|
|
||||||
async setClassID(classId, force) {
|
async setClassID(classId, force) {
|
||||||
if(this.classId === classId && !force) return;
|
if(this.classId === classId && !force) return;
|
||||||
this.classId = classId;
|
this.classId = classId;
|
||||||
await this.save({ fields: "classId"});
|
await this.save({ fields: ["classId"] });
|
||||||
const [groups, mainGroup] = await Promise.all([
|
const [groups, mainGroup] = await Promise.all([
|
||||||
this.getGroups(),
|
this.getGroups(),
|
||||||
Group.findOne({
|
Group.findOne({
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue