What
server/rescuegroups.js requests and reads an updatedAt attribute on animal records alongside updatedDate:
ANIMAL_FIELDS includes both "updatedDate" and "updatedAt" in the fields[animals] request.
normalizeCards computes updatedAt: newestTimestamp(attrs.updatedDate, attrs.updatedAt), taking whichever of the two is more recent.
updatedAt isn't a real field on the animals resource. The v5 schema reference only lists updatedDate ("Last updated") for animals — there's no updatedAt. Confirmed live: requesting fields[animals]=name,updatedDate,updatedAt,createdDate against /public/animals/search/available/cats/ returns updatedDate and createdDate on every record, but updatedAt never appears (the v5 API omits null/nonexistent attributes rather than returning them empty, per its Oct 2019 changelog).
Impact
None today — timestampValue(undefined) returns null, newestTimestamp filters out null candidates, so it silently falls back to updatedDate alone every time. attrs.updatedAt is always undefined in practice, so this is dead code, not a live bug.
Fix
Simplify normalizeCards to use attrs.updatedDate directly and drop "updatedAt" from ANIMAL_FIELDS and the newestTimestamp merge — no behavior change, just removes the dead branch and the wasted field request.
Found while investigating animal-update freshness for a RescueGroups org-outreach data pull (unrelated task) — not urgent, low risk, small cleanup.
What
server/rescuegroups.js requests and reads an
updatedAtattribute on animal records alongsideupdatedDate:ANIMAL_FIELDSincludes both"updatedDate"and"updatedAt"in thefields[animals]request.normalizeCardscomputesupdatedAt: newestTimestamp(attrs.updatedDate, attrs.updatedAt), taking whichever of the two is more recent.updatedAtisn't a real field on theanimalsresource. The v5 schema reference only listsupdatedDate("Last updated") for animals — there's noupdatedAt. Confirmed live: requestingfields[animals]=name,updatedDate,updatedAt,createdDateagainst/public/animals/search/available/cats/returnsupdatedDateandcreatedDateon every record, butupdatedAtnever appears (the v5 API omits null/nonexistent attributes rather than returning them empty, per its Oct 2019 changelog).Impact
None today —
timestampValue(undefined)returnsnull,newestTimestampfilters outnullcandidates, so it silently falls back toupdatedDatealone every time.attrs.updatedAtis alwaysundefinedin practice, so this is dead code, not a live bug.Fix
Simplify
normalizeCardsto useattrs.updatedDatedirectly and drop"updatedAt"fromANIMAL_FIELDSand thenewestTimestampmerge — no behavior change, just removes the dead branch and the wasted field request.Found while investigating animal-update freshness for a RescueGroups org-outreach data pull (unrelated task) — not urgent, low risk, small cleanup.