mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-13 23:42:12 +00:00
fix(cron): don't process group tasks during user cron
This commit is contained in:
parent
bc8b1884b7
commit
a5d9448af1
1 changed files with 4 additions and 13 deletions
|
|
@ -74,19 +74,10 @@ async function cronAsync (req, res) {
|
|||
}
|
||||
|
||||
const tasks = await Tasks.Task.find({
|
||||
$and: [
|
||||
{
|
||||
$or: [
|
||||
{ userId: user._id },
|
||||
{ userId: { $exists: false }, 'group.assignedUsers': user._id },
|
||||
],
|
||||
},
|
||||
{
|
||||
$or: [ // Exclude completed todos
|
||||
{ type: 'todo', completed: false },
|
||||
{ type: { $in: ['habit', 'daily', 'reward'] } },
|
||||
],
|
||||
},
|
||||
userId: user._id,
|
||||
$or: [ // Exclude completed todos
|
||||
{ type: 'todo', completed: false },
|
||||
{ type: { $in: ['habit', 'daily'] } },
|
||||
],
|
||||
}).exec();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue