From 8d32873f02cee687e8fe39a53c50aa8c74471aef Mon Sep 17 00:00:00 2001 From: gamray Date: Mon, 13 May 2024 21:03:24 +0200 Subject: [PATCH] Fixing rollback --- db/savedata.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db/savedata.go b/db/savedata.go index 4c0377b..e5a46fd 100644 --- a/db/savedata.go +++ b/db/savedata.go @@ -170,7 +170,9 @@ func UpdateAccountEggs(uuid []byte, eggs []defs.EggData) error { if err != nil { return err } -defer tx.Rollback() + + defer tx.Rollback() + for _, egg := range eggs { // TODO: find a fix to enforce encoding from body to EggData only if // it respects the EggData struct so we can get rid of the test