forked from FoundKeyGang/FoundKey
parent
0fbd7fa492
commit
7f564431be
1 changed files with 2 additions and 2 deletions
|
@ -103,8 +103,8 @@ export default define(meta, paramDef, async (ps, me) => {
|
|||
|
||||
const query = Users.createQueryBuilder('user')
|
||||
.where(`user.id IN (${ profQuery.getQuery() })`)
|
||||
// don't show users twice
|
||||
.andWhere('user.id NOT IN (:...ids)', { ids: users.map(user => user.id) })
|
||||
// don't show users twice, but also make sure there is at least one value otherwise this is an invalid query
|
||||
.andWhere('user.id NOT IN (:...ids)', { ids: users.length === 0 ? [''] : users.map(user => user.id) })
|
||||
.andWhere(new Brackets(qb => { qb
|
||||
.where('user.updatedAt IS NULL')
|
||||
.orWhere('user.updatedAt > :activeThreshold', { activeThreshold });
|
||||
|
|
Loading…
Reference in a new issue