Skip to content

Commit

Permalink
⚡ [PERF] Optimize Path Aggregation query in detail view
Browse files Browse the repository at this point in the history
  • Loading branch information
Chatewgne committed Sep 13, 2024
1 parent 6c41bd4 commit 2003433
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ CHANGELOG
**Improvements**

- ApidaeTrekParser now imports all features from GPX
- Optimize path aggregations query in detail view

**Minor fixes**

Expand Down
2 changes: 1 addition & 1 deletion geotrek/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ def distance(self, to_cls):

@property
def aggregations_optimized(self):
return self.aggregations.all().select_related('path', 'topo_object')
return self.aggregations.all().select_related('path')


class PathAggregation(models.Model):
Expand Down

0 comments on commit 2003433

Please sign in to comment.