0004-to-be-fixed-up-add-comment-about-our-heuristic-when-.patch
passerelle/apps/base_adresse/models.py | ||
---|---|---|
184 | 184 |
for result in results: # match by id if possible |
185 | 185 |
if result['ban_id'] == ban_id: |
186 | 186 |
return {'data': [result]} |
187 |
# in the hypothetical case that the ban_id has changed, instead of |
|
188 |
# returning an error we bet that the first result is the good one, |
|
189 |
# at least the nearest from the one we search. |
|
187 | 190 |
return results |
188 | 191 |
else: # retrocompatibility with raw BAN id |
189 | 192 |
return {'err': _('Address ID not found')} |
190 |
- |