Fix tasks being unscheduled if the day for the task already exists

This commit is contained in:
Vyn 2024-10-16 11:04:30 +02:00
parent dee7a6fa42
commit 3e7c9b150a
6 changed files with 26 additions and 6 deletions

View file

@ -29,8 +29,8 @@ void Source::createTask(const createTaskParams &task)
auto day = data->getDayByDate(task.date.value());
if (!day.has_value() && task.date.has_value()) {
day = data->insertDay({.id = generateUniqueId(), .date = task.date.value()});
dayId = day->id;
}
dayId = day->id;
}
if (task.event.has_value() && task.event->id()) {