From c5517076f492e878a21123ae4bcb927f25bbc0a2 Mon Sep 17 00:00:00 2001 From: rtz12 Date: Tue, 8 Nov 2016 01:43:00 +0100 Subject: Fick dich Keiser diff --git a/modules/lists/lists.go b/modules/lists/lists.go index d411209..be6e399 100644 --- a/modules/lists/lists.go +++ b/modules/lists/lists.go @@ -701,14 +701,13 @@ func (m *Module) removeGrilFromList(w http.ResponseWriter, r *http.Request, p ht http.Error(w, "could not remove gril", 500) return } - - _, err := m.g.DB.Exec(`UPDATE grilist.lists_grils SET "order" = "order" - 1 WHERE list_id = $1 AND "order" > $2`, listID, oldOrder) + + _, err = m.g.DB.Exec(`UPDATE grilist.lists_grils SET "order" = "order" - 1 WHERE list_id = $1 AND "order" > $2`, listID, oldOrder) if err != nil { log.Println("error removing gril:", err) http.Error(w, "could not remove gril", 500) return } - list.Grils = list.Grils[:0] -- cgit v0.10.1