Make professional services also use organisations

This commit is contained in:
Magnus Hagander
2010-02-25 17:03:12 +01:00
parent 0d55002019
commit 37c79c7882
3 changed files with 8 additions and 7 deletions

View File

@ -44,7 +44,7 @@ def region(request, servtype, regionname):
# DB model is a bit funky here, so use the extra-where functionality to filter properly.
# Field names are cleaned up earlier, so it's safe against injections.
services = ProfessionalService.objects.filter(approved=True).extra(where=["region_%s AND provides_%s" % (regionname, what),])
services = ProfessionalService.objects.select_related('organisation').filter(approved=True).extra(where=["region_%s AND provides_%s" % (regionname, what),])
return render_to_response('profserv/list.html', {
'title': title,