fix(tradein): avito houses dedup через match_or_create_house + merge-миграция дублей (108) #1546
2 changed files with 3 additions and 2 deletions
|
|
@ -802,7 +802,8 @@ def _persist_house(db: Session, h: HouseInfo, house_url: str) -> int:
|
||||||
db,
|
db,
|
||||||
ext_source="avito",
|
ext_source="avito",
|
||||||
ext_id=str(h.ext_id),
|
ext_id=str(h.ext_id),
|
||||||
address=h.full_address or h.short_address,
|
# short preferred: aliases have no city/region prefix; full is last resort
|
||||||
|
address=h.short_address or h.full_address,
|
||||||
lat=h.lat,
|
lat=h.lat,
|
||||||
lon=h.lon,
|
lon=h.lon,
|
||||||
year_built=h.year_built,
|
year_built=h.year_built,
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,7 @@ def test_persist_house_calls_match_with_correct_args():
|
||||||
db,
|
db,
|
||||||
ext_source="avito",
|
ext_source="avito",
|
||||||
ext_id="333",
|
ext_id="333",
|
||||||
address=h.full_address or h.short_address,
|
address=h.short_address or h.full_address,
|
||||||
lat=h.lat,
|
lat=h.lat,
|
||||||
lon=h.lon,
|
lon=h.lon,
|
||||||
year_built=h.year_built,
|
year_built=h.year_built,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue