gendesign/backend/app/services/site_finder
Light1YT 85c43ff68b
All checks were successful
Deploy / build-backend (push) Successful in 2m34s
Deploy / deploy (push) Successful in 2m11s
Deploy / changes (push) Successful in 6s
Deploy / build-frontend (push) Has been skipped
Deploy / build-worker (push) Successful in 3m10s
fix(analyze): cad_exists_in_db must require non-NULL geometry
Complements the NULL-geom 500 fix. cad_exists_in_db (docstring: "is there
GEOMETRY") checked only row existence, not geom IS NOT NULL — so for the ~964
meta-but-NULL-geom parcels it returned True. Consequence after the 500 fix:
such a parcel fell into the analyze fallback, find_or_enqueue_fetch step 2 saw
cad_exists_in_db=True → returned ("ready", None) → NO NSPD fetch enqueued →
analyze looped to a 202 with job_id=null and the parcel was stuck "fetching"
forever (never pulled real geometry, never resolved).

Fix: add `AND geom IS NOT NULL` to all three EXISTS branches (aligns the
function with its docstring). Now a NULL-geom parcel → cad_exists_in_db=False →
a real NSPD fetch is enqueued (202 + real job_id) → geometry populates →
re-poll → analyze succeeds (or 404 not_in_nspd if NSPD lacks it). No more
stuck-202. Valid-geom parcels unaffected. All 3 callers want geometry-presence
semantics. 37 analyze/fetch/by-bbox tests green. Refs #944.
2026-06-03 19:59:59 +05:00
..
__init__.py init 2026-04-25 13:45:19 +03:00
best_layouts.py fix(sf-21b): weighted AVG in _INLINE_VELOCITY_SQL (best_layouts.py) 2026-05-17 16:56:22 +03:00
cadastre_fetch.py fix(analyze): cad_exists_in_db must require non-NULL geometry 2026-06-03 19:59:59 +05:00
competitors.py feat(site-finder): per-competitor relevance_weight (#949 PR B) (#1000) 2026-06-02 19:45:38 +00:00
custom_pois.py feat(#254): user_custom_pois — backend schema + CRUD + scoring integration 2026-05-17 09:34:33 +03:00
filters.py init 2026-04-25 13:45:19 +03:00
future_supply.py feat(site_finder): future-supply-pressure index (#950 Step 6) (#1006) 2026-06-03 05:10:08 +00:00
gate_verdict.py feat(#29,#232): wire cad_parcels.permitted_use in analyze + cad_zouit fallback (G2+G3) 2026-05-17 08:17:22 +03:00
layout_signature.py fix(sf-08): add euro-1/euro-2 room_bucket for small-format rooms=2 flats 2026-05-17 14:38:48 +03:00
layout_velocity_refresh.py feat(analytics): mv_layout_velocity MV + refresh helper (#113 PR B) (#194) 2026-05-16 08:26:59 +00:00
macro.py feat(site-finder): macro_indicator table + backfill + reader (#945 PR A) (#963) 2026-06-02 18:41:28 +00:00
market_metrics.py feat(site_finder): market-metrics service (#949 PR A, §9.2) (#997) 2026-06-02 19:26:26 +00:00
noise_loader.py feat(site-finder): isochrones UI + networks VKH + OSM substations 2026-05-11 21:48:21 +03:00
parser.py init 2026-04-25 13:45:19 +03:00
poi_loader.py feat(site-finder): v3.1 — cad_parcels_geom, analyze fallback, POI lat/lon, OSM expand 2026-05-11 19:52:19 +03:00
poi_score.py feat(sf-b6): GET /parcels/{cad}/poi-score — weighted top-7 (#333) 2026-05-17 21:11:25 +00:00
pzz_loader.py fix(pzz_loader): replace bare db.rollback() with SAVEPOINT per-row (#124) 2026-05-14 23:29:23 +03:00
quarter_dump_lookup.py fix(#234): address re-review nits — Settings singleton + docstring sync 2026-05-17 09:31:43 +03:00
quarter_price_index_refresh.py feat(db): quarter_price_index FDW foreign table + monthly refresh (Refs #762) (#797) 2026-05-30 17:16:28 +00:00
quarter_price_refresh.py feat(analytics): mv_quarter_price_per_m2 MV + refresh helper (#33 D1 PR A) (#209) 2026-05-16 11:12:01 +00:00
scorer.py init 2026-04-25 13:45:19 +03:00
supply_layers.py feat(site-finder): supply_layers v2 compute service (#950 EPIC6 step3+4) (#1004) 2026-06-02 20:34:26 +00:00
velocity.py fix(sf-17): rosreestr velocity fallback via cad_quarter (~100% EKB coverage) 2026-05-17 16:50:19 +03:00
weight_profiles.py feat(#114): seed 3 default weight presets + include_system API param 2026-05-16 22:49:56 +03:00