From 0dcc1e1fd911fba1efda6172b450735f3647a100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20=C3=85hall?= Date: Thu, 18 Apr 2024 20:08:07 +0200 Subject: [PATCH] Fixed bug deleting all schedules --- node.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/node.go b/node.go index 66b5a3e..a78785b 100644 --- a/node.go +++ b/node.go @@ -325,6 +325,10 @@ func CreateNode(userID, parentID int, name string) (node Node, err error) { // { return } // }}} func UpdateNode(userID, nodeID, timeOffset int, content string, cryptoKeyID int, markdown bool) (err error) { // {{{ + if nodeID == 0 { + return + } + var timezone string row := service.Db.Conn.QueryRow(`SELECT timezone FROM _webservice.user WHERE id=$1`, userID) err = row.Scan(&timezone)