From c368482d1c6720e4f32063f8be3f73ec52aa5f9e Mon Sep 17 00:00:00 2001 From: Viktor Antropov Date: Wed, 9 Sep 2026 14:32:31 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20relation=20=D1=81=20=D0=BE=D0=B4=D0=BD?= =?UTF-8?q?=D0=B8=D0=BC=20=D0=BA=D0=BE=D0=BB=D1=8C=D1=86=D0=BE=D0=BC=20?= =?UTF-8?q?=E2=80=94=20geom=20=D0=BA=D0=B0=D0=BA=20dict,=20=D0=BD=D0=B5=20?= =?UTF-8?q?coordinates-=D1=81=D0=BF=D0=B8=D1=81=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit polygons.append(poly['coordinates']) хранит [ring]; при 1 кольце geom=polygons[0] отдавал голый список (не dict) → pydantic dict_type валидация GeoFeature падала 500. Теперь ветки собирают dict явно. --- backend/routers/water.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/routers/water.py b/backend/routers/water.py index 120a0fb..5085b5f 100644 --- a/backend/routers/water.py +++ b/backend/routers/water.py @@ -175,7 +175,7 @@ def _water_geoms(elements: list[dict]) -> list[dict]: if not polygons: continue if len(polygons) == 1: - geom = polygons[0] # {'type': 'Polygon', 'coordinates': [ring]} + geom = {'type': 'Polygon', 'coordinates': polygons[0]} else: # GeoJSON MultiPolygon: coordinates = список polygon.coordinates. geom = {