Skip to content

Commit

Permalink
optimize api path
Browse files Browse the repository at this point in the history
  • Loading branch information
submarcos committed May 31, 2017
1 parent 478f9df commit 0065c0c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions geotrek/core/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@


class PathEntityOptions(AltimetryEntityOptions):
# Profiles for paths
pass
def get_queryset(self):
qs = super(PathEntityOptions, self).get_queryset()
qs = qs.prefetch_related('networks', 'usages')
return qs


urlpatterns += registry.register(Path, PathEntityOptions, menu=settings.TREKKING_TOPOLOGY_ENABLED)
Expand Down

0 comments on commit 0065c0c

Please sign in to comment.