More informative error message when matching accidentally a wrong postal code. See #64 for more context.
This commit is contained in:
parent
25f2e71264
commit
082d177f19
@ -212,9 +212,14 @@ def guess_postal_code(flats_list, constraint, config, distance_threshold=20000):
|
||||
|
||||
if distance > distance_threshold:
|
||||
LOGGER.info(
|
||||
("Postal code %s found for flat %s is off-constraints. "
|
||||
"Min distance is %f."),
|
||||
postal_code, flat["id"], distance
|
||||
("Postal code %s found for flat %s is off-constraints "
|
||||
"(distance is %dm > %dm). Let's consider it is an "
|
||||
"artifact match and keep the post without this postal "
|
||||
"code."),
|
||||
postal_code,
|
||||
flat["id"],
|
||||
int(distance),
|
||||
int(distance_threshold)
|
||||
)
|
||||
postal_code = None
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user