diff --git a/db/db.go b/db/db.go index 165765b80..314dc45fc 100644 --- a/db/db.go +++ b/db/db.go @@ -1234,6 +1234,7 @@ func (db database) UpdateBountyPayment(b Bounty) (Bounty, error) { db.db.Model(&b).Where("created", b.Created).Updates(map[string]interface{}{ "paid": b.Paid, }) + db.db.Model(&b).Where("created", b.Created).Updates(b) return b, nil } @@ -1241,6 +1242,7 @@ func (db database) UpdateBountyCompleted(b Bounty) (Bounty, error) { db.db.Model(&b).Where("created", b.Created).Updates(map[string]interface{}{ "completed": b.Completed, }) + db.db.Model(&b).Where("created", b.Created).Updates(b) return b, nil } diff --git a/handlers/bounty.go b/handlers/bounty.go index 7fb908fbc..7ef6bd60d 100644 --- a/handlers/bounty.go +++ b/handlers/bounty.go @@ -342,8 +342,8 @@ func UpdateCompletedStatus(w http.ResponseWriter, r *http.Request) { now := time.Now() // set bounty as completed if !bounty.Paid && !bounty.Completed { - bounty.Completed = true bounty.CompletionDate = &now + bounty.Completed = true } db.DB.UpdateBountyCompleted(bounty) }