mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00:00
fix(server): workflow date filter, make end date inclusive (#29876)
Co-authored-by: Raul Plesa <raul.plesa@external.grifols.com> Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
This commit is contained in:
parent
a04e2ddeca
commit
b4530b0671
2 changed files with 36 additions and 2 deletions
|
|
@ -127,7 +127,7 @@ const methods = wrapper<Manifest>({
|
|||
assetDateFilter: ({ config, data }) => {
|
||||
const assetDate = new Date(data.asset.localDateTime);
|
||||
let startDate = new Date(config.startDate.year, config.startDate.month - 1, config.startDate.day);
|
||||
let endDate = new Date(config.endDate.year, config.endDate.month - 1, config.endDate.day);
|
||||
let endDate = new Date(config.endDate.year, config.endDate.month - 1, config.endDate.day + 1);
|
||||
|
||||
if (config.recurring) {
|
||||
startDate.setFullYear(assetDate.getFullYear());
|
||||
|
|
@ -142,7 +142,7 @@ const methods = wrapper<Manifest>({
|
|||
}
|
||||
}
|
||||
|
||||
return { workflow: { continue: assetDate >= startDate && assetDate <= endDate } };
|
||||
return { workflow: { continue: assetDate >= startDate && assetDate < endDate } };
|
||||
},
|
||||
|
||||
assetLock: ({ config, data }) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue