if update without create, just create

This commit is contained in:
Ted Unangst 2019-10-10 19:12:34 -04:00
parent 5e2b83b952
commit f5e83b4905
1 changed files with 11 additions and 9 deletions

View File

@ -827,8 +827,8 @@ func xonksaver(user *WhatAbout, item junk.Junk, origin string) *Honk {
prev := getxonk(user.ID, xonk.XID) prev := getxonk(user.ID, xonk.XID)
if prev == nil { if prev == nil {
log.Printf("didn't find old version for update: %s", xonk.XID) log.Printf("didn't find old version for update: %s", xonk.XID)
return nil isUpdate = false
} } else {
prev.Noise = xonk.Noise prev.Noise = xonk.Noise
prev.Precis = xonk.Precis prev.Precis = xonk.Precis
prev.Date = xonk.Date prev.Date = xonk.Date
@ -836,7 +836,9 @@ func xonksaver(user *WhatAbout, item junk.Junk, origin string) *Honk {
prev.Onts = xonk.Onts prev.Onts = xonk.Onts
prev.Place = xonk.Place prev.Place = xonk.Place
updatehonk(prev) updatehonk(prev)
} else if needxonk(user, &xonk) { }
}
if !isUpdate && needxonk(user, &xonk) {
if rid != "" { if rid != "" {
if needxonkid(user, rid) { if needxonkid(user, rid) {
goingup++ goingup++