Не выдавать цену, когда рядом нет ни одного аналога #3537
2 changed files with 4 additions and 4 deletions
|
|
@ -4196,9 +4196,7 @@ def _price_from_inputs(
|
|||
and dkp_raw is not None
|
||||
and dkp_raw.get("count", 0) >= DEALS_HEADLINE_FALLBACK_MIN_N
|
||||
and dkp_raw.get("median_ppm2", 0) > 0
|
||||
and not (
|
||||
settings.estimate_require_local_evidence and dkp_raw.get("scope") == "city_wide"
|
||||
)
|
||||
and not (settings.estimate_require_local_evidence and dkp_raw.get("scope") == "city_wide")
|
||||
):
|
||||
median_ppm2 = float(dkp_raw["median_ppm2"])
|
||||
median_price = int(median_ppm2 * area_m2)
|
||||
|
|
|
|||
|
|
@ -59,7 +59,9 @@ def _run_estimate(
|
|||
|
||||
async def _run():
|
||||
with (
|
||||
patch("app.services.estimator.settings.estimate_require_local_evidence", require_analogs),
|
||||
patch(
|
||||
"app.services.estimator.settings.estimate_require_local_evidence", require_analogs
|
||||
),
|
||||
patch("app.services.estimator.geocode", new=AsyncMock(return_value=_make_fake_geo())),
|
||||
patch("app.services.estimator.dadata_clean_address", new=AsyncMock(return_value=None)),
|
||||
patch("app.services.estimator.match_house_readonly", return_value=None),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue