From 003d2444a73f05f8ef52174298affa190264f003 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 8 Jul 2016 18:50:30 +0200 Subject: fixe cut/cart title update if groupname is unknown diff --git a/rddb/rddb.go b/rddb/rddb.go index 6c59578..45555f8 100644 --- a/rddb/rddb.go +++ b/rddb/rddb.go @@ -650,6 +650,15 @@ func (db *DB) updateCutCartTitle(cart, cut uint, groupName, sourceFile string) ( ext := strings.TrimLeft(filepath.Ext(filename), ".") filename = strings.TrimRight(strings.TrimSuffix(filename, ext), ".") + if groupName == "" { + res := db.getGroupOfCart(cart) + if res.err != nil { + result.err = res.err + return + } + groupName = res.group + } + groupDefaultTitle := "" result.err = db.getGroupDefaultTitleStmt.QueryRow(groupName).Scan(&groupDefaultTitle) if result.err != nil { -- cgit v0.10.2