Skip to content

Commit

Permalink
Use all_types_completion to get list of entities, not primary_type
Browse files Browse the repository at this point in the history
  • Loading branch information
cnorthwood committed Aug 30, 2011
1 parent 85beea6 commit 65447b4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions molly/apps/tours/views.py
Expand Up @@ -73,11 +73,13 @@ def initial_context(self, request, slug, entities):
'tour_type': tour_type,
'entities': [],
'attractions': dict(
(et, sorted(et.entity_set.filter(location__isnull=False),
(et, sorted(et.entities_completion.filter(location__isnull=False),
key=attrgetter('title')))
for et in EntityType.objects.filter(slug__in=tour_type['attraction_types'])),
'all_pois': sorted(Entity.objects.filter(all_types_completion__slug__in=tour_type['attraction_types']),
key=attrgetter('title'))
for et in EntityType.objects.filter(
slug__in=tour_type['attraction_types'])),
'all_pois': sorted(Entity.objects.filter(
all_types_completion__slug__in=tour_type['attraction_types']),
key=attrgetter('title'))
})

for entity in entities.split('/'):
Expand Down

0 comments on commit 65447b4

Please sign in to comment.