← back to Wallco Ai
refresh_designs_snapshot.py: emit local_path so /designs/img/by-id/:id route resolves without hitting the broken prod psql fallback (psql as 'root' role fails on Kamatera; route now uses in-memory DESIGNS.local_path → basename → IMG_DIR resolve)
f9b2acc05633ac7814d9f8fc3798fc78d596fe28 · 2026-05-22 14:11:57 -0700 · Steve Abrams
Files touched
M scripts/refresh_designs_snapshot.py
Diff
commit f9b2acc05633ac7814d9f8fc3798fc78d596fe28
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Fri May 22 14:11:57 2026 -0700
refresh_designs_snapshot.py: emit local_path so /designs/img/by-id/:id route resolves without hitting the broken prod psql fallback (psql as 'root' role fails on Kamatera; route now uses in-memory DESIGNS.local_path → basename → IMG_DIR resolve)
---
scripts/refresh_designs_snapshot.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/refresh_designs_snapshot.py b/scripts/refresh_designs_snapshot.py
index b3340d7..cc7d970 100644
--- a/scripts/refresh_designs_snapshot.py
+++ b/scripts/refresh_designs_snapshot.py
@@ -95,6 +95,11 @@ for r in rows:
"handle": f"wallco-{r['id']:04d}",
"image_url": f"/designs/img/{filename}",
"filename": filename,
+ # local_path carried through so the /designs/img/by-id/:id route's
+ # in-memory DESIGNS lookup resolves without falling through to the
+ # PG fallback. On prod the absolute Mac2 path won't exist on disk;
+ # the route already resolves by basename against IMG_DIR as a fallback.
+ "local_path": r['local_path'],
"generator": "wallco.ai",
"seed": r['seed'],
"is_published": bool(r['is_published']),
← 323e1fa add scripts/sweep_orphan_generated.js — orphan-PNG sweeper f
·
back to Wallco Ai
·
feat(catalog): categoryDisplay translator + vendor-inspired 0592448 →