Skip to content

Commit

Permalink
Prefetch image set tags
Browse files Browse the repository at this point in the history
  • Loading branch information
timonegk committed Feb 19, 2019
1 parent 803b0d1 commit e78c2bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion imagetagger/imagetagger/users/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ def view_team(request, team_id):
admins = team.admins

imagesets = ImageSet.objects.filter(team=team).annotate(
image_count_agg=Count('images')).order_by('-public', 'name')
image_count_agg=Count('images')).prefetch_related('set_tags').\
order_by('-public', 'name')
export_formats = ExportFormat.objects.filter(
team=team).prefetch_related('annotations_types').order_by('name')

Expand Down

0 comments on commit e78c2bf

Please sign in to comment.