From 4ad4bcf9e706703fff64fde77f97ee4067a5765b Mon Sep 17 00:00:00 2001 From: Přemysl Janouch
Date: Fri, 19 Apr 2019 13:40:47 +0200 Subject: sklad: fix index update when changing parent --- cmd/sklad/db.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/sklad/db.go b/cmd/sklad/db.go index 262a164..b58a5f2 100644 --- a/cmd/sklad/db.go +++ b/cmd/sklad/db.go @@ -225,7 +225,7 @@ func dbContainerUpdate(c *Container, updated Container) error { } indexChildren[c.Parent] = filterContainer(indexChildren[c.Parent], c) - indexChildren[newID] = append(indexChildren[newID], c) + indexChildren[updated.Parent] = append(indexChildren[updated.Parent], c) } *c = updated return dbCommit() -- cgit v1.2.3-70-g09d2