refactor: refs #7457 Added from param if not exists
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
1730276844
commit
33f1ed360b
|
@ -96,9 +96,18 @@ module.exports = Self => {
|
|||
teamMembersId.push(userId);
|
||||
}
|
||||
|
||||
if (args && args.myTeam)
|
||||
if (args?.myTeam)
|
||||
args.teamIds = teamIds;
|
||||
|
||||
if (args?.to)
|
||||
args.to.setHours(23, 59, 0, 0);
|
||||
|
||||
if (!args.from) {
|
||||
const yesterday = new Date();
|
||||
yesterday.setDate(yesterday.getDate() - 1);
|
||||
args.from = yesterday.toISOString().split('T')[0];
|
||||
}
|
||||
|
||||
const where = buildFilter(args, (param, value) => {
|
||||
switch (param) {
|
||||
case 'search':
|
||||
|
@ -194,7 +203,7 @@ module.exports = Self => {
|
|||
`);
|
||||
|
||||
stmt.merge(conn.makeWhere(filter.where));
|
||||
stmt.merge(`GROUP BY id`);
|
||||
stmt.merge(`GROUP BY o.id`);
|
||||
stmt.merge(conn.makePagination(filter));
|
||||
stmts.push(stmt);
|
||||
stmts.push(`SET SESSION optimizer_search_depth = @_optimizer_search_depth`);
|
||||
|
|
Loading…
Reference in New Issue