SPB Git

spb/rareindex

Public

auctions.assess: pass assessed_at as ISO timestamptz (postgres.js rejects Date params in raw sql)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Simon-Pierre Boucher committed (Sep 11, 2026) parent 2f355ca Browse files

1 changed file +2 −2

Unified Split
modified workers/auctions/assess.ts +2 −2
@@ -114,8 +114,8 @@ export async function assessLots(opts: { limit?: number; all?: boolean; now?: Da
114 114 buyer_premium_rate = ${a.buyerPremiumRate}, fee_basis = ${a.feeBasis},
115 115 all_in_bid_usd = ${a.allInBidUsd}, all_in_estimate_low_usd = ${a.allInEstimateLowUsd}, all_in_estimate_high_usd = ${a.allInEstimateHighUsd},
116 116 riv_usd_at_assessment = ${a.rivUsd}, bid_vs_riv = ${a.bidVsRiv}, estimate_vs_riv = ${a.estimateVsRiv},
117 − assessment_verdict = ${a.verdict}, assessed_at = ${now}
118 − where id = ${r.id}`);
117 + assessment_verdict = ${a.verdict}, assessed_at = ${now.toISOString()}::timestamptz
118 + where id = ${r.id}`); // postgres.js needs an ISO string for a Date parameter in raw sql
119 119 res.assessed++;
120 120 res.verdicts[a.verdict] = (res.verdicts[a.verdict] ?? 0) + 1;
121 121 }
122 122
Menu

Theme