provide score when llocating people
This commit is contained in:
parent
eecbf474df
commit
5e96d98693
2 changed files with 4 additions and 0 deletions
|
@ -304,6 +304,8 @@ class CustomLocation:
|
|||
('nearby', tuple(location.pk for location in self.nearby)),
|
||||
('altitude', None if self.altitude is None else round(self.altitude, 2))
|
||||
))
|
||||
if hasattr(self, 'score'):
|
||||
result['score'] = self.score
|
||||
if not grid.enabled:
|
||||
result.pop('grid_square')
|
||||
if include_type:
|
||||
|
|
|
@ -91,6 +91,8 @@ class Locator:
|
|||
best_location = location
|
||||
best_score = score
|
||||
|
||||
best_location.score = best_score
|
||||
|
||||
return best_location
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue