Delete tags before updating them in timeentry save
This commit is contained in:
parent
2a2aea8641
commit
bd9a72920f
@ -85,6 +85,8 @@ func (gdb *GimeDB) SaveTimeEntryType(tp int, te *TimeEntry) error {
|
||||
if err = useDb.SetTimestamp(tePath, "end", te.end); err != nil {
|
||||
return err
|
||||
}
|
||||
// Remove all previously saved tags
|
||||
useDb.DeleteBucket(tePath, "tags")
|
||||
for i := 0; i < te.tags.Length(); i++ {
|
||||
err = useDb.SetValue(append(tePath, "tags"), strconv.Itoa(i), te.tags.Get(i))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user