[object Object]

← back to Homesonspec

fix: david-weekley stories/garages must be integer (1.5-story home 400'd the Houston page)

40750c02979ccde5c3933c2394a79b83123f315f · 2026-07-28 07:05:15 -0700 · Steve

Round stories+garages at emission — schema wants int; num() returned a float for
a 1.5-story home, rejecting the whole Houston homes-ready-soon page.

Files touched

Diff

commit 40750c02979ccde5c3933c2394a79b83123f315f
Author: Steve <steve@designerwallcoverings.com>
Date:   Tue Jul 28 07:05:15 2026 -0700

    fix: david-weekley stories/garages must be integer (1.5-story home 400'd the Houston page)
    
    Round stories+garages at emission — schema wants int; num() returned a float for
    a 1.5-story home, rejecting the whole Houston homes-ready-soon page.
---
 collectors/david-weekley/src/index.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/collectors/david-weekley/src/index.ts b/collectors/david-weekley/src/index.ts
index aa84419..57ce73a 100644
--- a/collectors/david-weekley/src/index.ts
+++ b/collectors/david-weekley/src/index.ts
@@ -234,8 +234,8 @@ export const davidWeekleyAdapter: SourceAdapter = {
             beds: fv(h.beds, null, page.url),
             bathsTotal: fv(h.baths, null, page.url),
             sqft: fv(h.sqft, null, page.url),
-            stories: fv(h.stories, null, page.url),
-            garageSpaces: fv(h.garages, null, page.url),
+            stories: fv(h.stories != null ? Math.round(h.stories) : null, null, page.url), // schema wants int (1.5-story → 2)
+            garageSpaces: fv(h.garages != null ? Math.round(h.garages) : null, null, page.url),
             homeType: fv("SINGLE_FAMILY" as never, null, page.url, "David Weekley quick move-in"),
             constructionStatus: fv(statusOf(h.statusLabel) as never, h.statusLabel, page.url),
             estCompletionDate: fv(estDate(h.statusLabel), h.statusLabel, page.url),

← b319e2f TK-10: add finish-tk10.sh turnkey go-live driver  ·  back to Homesonspec  ·  build-loop: go nationwide — sweep 42 top homebuilding states da8824a →