update whofore after an update

This commit is contained in:
Ted Unangst 2019-11-20 11:35:34 -05:00
parent 16c83330b9
commit 0a6ec93384
2 changed files with 3 additions and 2 deletions

View File

@ -853,6 +853,7 @@ func xonksaver(user *WhatAbout, item junk.Junk, origin string) *Honk {
prev.Donks = xonk.Donks prev.Donks = xonk.Donks
prev.Onts = xonk.Onts prev.Onts = xonk.Onts
prev.Place = xonk.Place prev.Place = xonk.Place
prev.Whofore = xonk.Whofore
updatehonk(prev) updatehonk(prev)
} }
} }

View File

@ -493,7 +493,7 @@ func updatehonk(h *Honk) error {
err = deleteextras(tx, h.ID) err = deleteextras(tx, h.ID)
if err == nil { if err == nil {
_, err = tx.Stmt(stmtUpdateHonk).Exec(h.Precis, h.Noise, h.Format, dt, h.ID) _, err = tx.Stmt(stmtUpdateHonk).Exec(h.Precis, h.Noise, h.Format, h.Whofore, dt, h.ID)
} }
if err == nil { if err == nil {
err = saveextras(tx, h) err = saveextras(tx, h)
@ -737,7 +737,7 @@ func prepareStatements(db *sql.DB) {
stmtDeleteMeta = preparetodie(db, "delete from honkmeta where honkid = ? and genus <> ?") stmtDeleteMeta = preparetodie(db, "delete from honkmeta where honkid = ? and genus <> ?")
stmtSaveHonk = preparetodie(db, "insert into honks (userid, what, honker, xid, rid, dt, url, audience, noise, convoy, whofore, format, precis, oonker, flags) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)") stmtSaveHonk = preparetodie(db, "insert into honks (userid, what, honker, xid, rid, dt, url, audience, noise, convoy, whofore, format, precis, oonker, flags) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")
stmtDeleteHonk = preparetodie(db, "delete from honks where honkid = ?") stmtDeleteHonk = preparetodie(db, "delete from honks where honkid = ?")
stmtUpdateHonk = preparetodie(db, "update honks set precis = ?, noise = ?, format = ?, dt = ? where honkid = ?") stmtUpdateHonk = preparetodie(db, "update honks set precis = ?, noise = ?, format = ?, whofore = ?, dt = ? where honkid = ?")
stmtSaveOnt = preparetodie(db, "insert into onts (ontology, honkid) values (?, ?)") stmtSaveOnt = preparetodie(db, "insert into onts (ontology, honkid) values (?, ?)")
stmtDeleteOnts = preparetodie(db, "delete from onts where honkid = ?") stmtDeleteOnts = preparetodie(db, "delete from onts where honkid = ?")
stmtSaveDonk = preparetodie(db, "insert into donks (honkid, fileid) values (?, ?)") stmtSaveDonk = preparetodie(db, "insert into donks (honkid, fileid) values (?, ?)")