From 376ce4a69e016d13eff28589a5caa627bf7c451b Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 7 Feb 2011 12:48:12 -0600 Subject: Clean up Package related objects code Main change is just to move groups from the default packagegroup_set location to a related_name of groups. Also refer to the Package class directly rather than by text string if we have it available. Signed-off-by: Dan McGee --- packages/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'packages/views.py') diff --git a/packages/views.py b/packages/views.py index 4f7c3b9..9c34db0 100644 --- a/packages/views.py +++ b/packages/views.py @@ -104,8 +104,7 @@ def group_details(request, arch, name): arch = get_object_or_404(Arch, name=arch) arches = [ arch ] arches.extend(Arch.objects.filter(agnostic=True)) - pkgs = Package.objects.filter(packagegroup__name=name, - arch__in=arches) + pkgs = Package.objects.filter(groups__name=name, arch__in=arches) pkgs = pkgs.order_by('pkgname') if len(pkgs) == 0: raise Http404 -- cgit v1.2.3-24-g4f1b