.
This commit is contained in:
@@ -150,9 +150,12 @@ def delete_note(id, note_ind, list="Default") -> bool:
|
||||
curs.execute(
|
||||
"""
|
||||
DELETE FROM notes
|
||||
WHERE id = (
|
||||
SELECT id FROM notes
|
||||
WHERE user_id = %s AND list_id = (SELECT id FROM lists WHERE name = %s AND user_id = %s)
|
||||
ORDER BY remind_at IS NULL DESC, remind_at ASC, created_at DESC
|
||||
LIMIT 1 OFFSET %s
|
||||
)
|
||||
""",
|
||||
(id, list, id, note_ind),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user