8267-devToTest #3270

Merged
alexm merged 131 commits from 8267-devToTest into test 2024-12-03 12:18:21 +00:00
1 changed files with 1 additions and 3 deletions
Showing only changes of commit 7be1bc385f - Show all commits

View File

@ -58,9 +58,7 @@ module.exports = Self => {
if (!isSubordinate || (isSubordinate && userId == id && !isTeamBoss))
throw new UserError(`You don't have enough privileges`);
const labour = await models.WorkerLabour.findById(args.businessFk, {
include: {relation: 'department'}
}, myOptions);
const labour = await models.WorkerLabour.findById(args.businessFk, myOptions);
if (args.dated < labour.started || (labour.ended != null && args.dated > labour.ended))
throw new UserError(`The contract was not active during the selected date`);