@kipicore/dbcore 1.1.288 → 1.1.289
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -103,10 +103,10 @@ class LectureModel extends sequelize_1.Model {
|
|
|
103
103
|
if (classRoomConflict)
|
|
104
104
|
throw new Error(errorMessages_1.LECTURE_ERROR_MESSAGES.CLASSROOM_OCCUPIED);
|
|
105
105
|
}
|
|
106
|
-
const teacherConflictWhere =
|
|
106
|
+
// const teacherConflictWhere = omit(where, ['slotId']);
|
|
107
107
|
if (lecture.primaryUserId) {
|
|
108
108
|
const teacherConflict = await LectureModel.findOne({
|
|
109
|
-
where: { ...
|
|
109
|
+
where: { ...where, primaryUserId: lecture.primaryUserId },
|
|
110
110
|
...options,
|
|
111
111
|
});
|
|
112
112
|
if (teacherConflict)
|
|
@@ -114,7 +114,7 @@ class LectureModel extends sequelize_1.Model {
|
|
|
114
114
|
}
|
|
115
115
|
if (lecture.secondaryUserId) {
|
|
116
116
|
const teacherConflict = await LectureModel.findOne({
|
|
117
|
-
where: { ...
|
|
117
|
+
where: { ...where, secondaryUserId: lecture.secondaryUserId },
|
|
118
118
|
...options,
|
|
119
119
|
});
|
|
120
120
|
if (teacherConflict)
|
package/package.json
CHANGED