From 3aedcb4218e6b63dfa90eaef4ac43901a0a6c450 Mon Sep 17 00:00:00 2001 From: elraphty Date: Fri, 15 Nov 2024 16:14:06 +0100 Subject: [PATCH] updated function --- db/db.go | 2 +- handlers/bounty.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/db/db.go b/db/db.go index a31db4315..1eb8689ef 100644 --- a/db/db.go +++ b/db/db.go @@ -1348,7 +1348,7 @@ func (db database) UpdateBountyPaymentStatuses(bounty NewBounty) (NewBounty, err "completion_date": bounty.CompletionDate, } - db.db.Where("created", bounty.Created).Updates(bountyUpdates) + db.db.Model(&NewBounty{}).Where("created", bounty.Created).Updates(bountyUpdates) return bounty, nil } diff --git a/handlers/bounty.go b/handlers/bounty.go index 3b4794a3c..4d3b6d028 100644 --- a/handlers/bounty.go +++ b/handlers/bounty.go @@ -1000,6 +1000,7 @@ func (h *bountyHandler) UpdateBountyPaymentStatus(w http.ResponseWriter, r *http bounty.PaymentPending = false bounty.PaymentFailed = false bounty.Paid = true + bounty.PaidDate = &now bounty.Completed = true bounty.CompletionDate = &now