Fix condition in saveReportToTaskIndex to correctly prevent duplicate report submissions by ensuring the last report save date matches the current date.
This commit is contained in:
parent
201dfe465f
commit
57d4b8cc19
|
|
@ -29,7 +29,7 @@ function saveLastReportSaveDate(date: Date): void {
|
||||||
|
|
||||||
export function saveReportToTaskIndex(): void {
|
export function saveReportToTaskIndex(): void {
|
||||||
const lastReprtSaveDate = getLastReportSaveDate();
|
const lastReprtSaveDate = getLastReportSaveDate();
|
||||||
if (lastReprtSaveDate && !isSameDay(lastReprtSaveDate, new Date())) {
|
if (lastReprtSaveDate && isSameDay(lastReprtSaveDate, new Date())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue