weight edit fixes
Deploy / deploy-dev (push) Has been skipped
Deploy / deploy-prod (push) Successful in 2m36s

This commit is contained in:
Corey Blais committed 2026-06-16 18:13:54 -04:00
1 parent 1849ecd73b
commit 53b75588a2
3 files changed
+17 -31

No files matched your search

+7 -1
View File
@@ -925,7 +925,13 @@ export const updateWeightForBird = async (
notes = $5
WHERE id = $1
AND bird_id = $2
AND recorded_on >= CURRENT_DATE - (2 * INTERVAL '1 day')
AND id IN (
SELECT recent.id
FROM weight_records recent
WHERE recent.bird_id = $2
ORDER BY recent.recorded_on DESC, recent.created_at DESC
LIMIT 3
)
RETURNING id, bird_id, weight_grams, recorded_on::text, notes`,
[weightId, birdId, weightGrams, recordedOn, notes],
);