summaryrefslogtreecommitdiff
path: root/src/hub
diff options
context:
space:
mode:
authorMarkus Grüneis <gimpf@gimpf.org>2014-10-18 19:06:10 +0200
committerMarkus Grüneis <gimpf@gimpf.org>2014-10-18 19:06:10 +0200
commit6c3079981325a0b61606198850ac4431da346ee3 (patch)
tree155225cb15a085c01f5ab3b7e7f2dc034a777f34 /src/hub
parenthub: add kind of a Makefile (diff)
hub: fix unique-constraint violation
Diffstat (limited to 'src/hub')
-rw-r--r--src/hub/src/spreadspace.org/sfive/s5store.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/hub/src/spreadspace.org/sfive/s5store.go b/src/hub/src/spreadspace.org/sfive/s5store.go
index 6fcb6a2..09ba684 100644
--- a/src/hub/src/spreadspace.org/sfive/s5store.go
+++ b/src/hub/src/spreadspace.org/sfive/s5store.go
@@ -222,7 +222,11 @@ func (s sqliteStore) insertSourceTagLinks(src sourceDb, tags []tagDb) (err error
st[i].SourceId = src.Id
}
for i := range st {
- err = s.db.Insert(&st[i])
+ _, err = s.db.Exec(
+ "insert or ignore into "+SourceTagsTn+" values (?,?)",
+ st[i].SourceId,
+ st[i].TagId)
+ // err = s.db.Insert(&st[i])
if err != nil {
//fmt.Printf("st\n")
return