Skip to content
Snippets Groups Projects
Unverified Commit 92099dc7 authored by Matiss Janis Aboltins's avatar Matiss Janis Aboltins Committed by GitHub
Browse files

:bug: (schedules) fix creating schedules with the same name (#1463)

Closes #1375
parent 9d27379b
No related branches found
No related tags found
No related merge requests found
BEGIN TRANSACTION;
ALTER TABLE schedules_next_date ADD COLUMN tombstone INTEGER DEFAULT 0;
COMMIT;
......@@ -188,9 +188,10 @@ export async function setNextDate({
// Methods
async function checkIfScheduleExists(name, scheduleId) {
let idForName = await db.first('SELECT id from schedules WHERE name = ?', [
name,
]);
let idForName = await db.first(
'SELECT id from schedules WHERE tombstone = 0 AND name = ?',
[name],
);
if (idForName == null) {
return false;
......
---
category: Bugfix
authors: [MatissJanis]
---
Fix creating a new schedule with the same name as a deleted schedule
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment