mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-28 10:33:02 -05:00
🐛 (schedules) fix creating schedules with the same name (#1463)
Closes #1375
This commit is contained in:
committed by
GitHub
parent
9d27379b25
commit
92099dc763
@@ -0,0 +1,5 @@
|
||||
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;
|
||||
|
||||
6
upcoming-release-notes/1463.md
Normal file
6
upcoming-release-notes/1463.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Bugfix
|
||||
authors: [MatissJanis]
|
||||
---
|
||||
|
||||
Fix creating a new schedule with the same name as a deleted schedule
|
||||
Reference in New Issue
Block a user