summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/views/display.py8
-rw-r--r--packages/views/flag.py6
2 files changed, 7 insertions, 7 deletions
diff --git a/packages/views/display.py b/packages/views/display.py
index 445c1ab..c2369ab 100644
--- a/packages/views/display.py
+++ b/packages/views/display.py
@@ -168,7 +168,7 @@ def group_details(request, arch, name):
def files(request, name, repo, arch):
- pkg = get_object_or_404(Package,
+ pkg = get_object_or_404(Package.objects.normal(),
pkgname=name, repo__name__iexact=repo, arch__name=arch)
# files are inserted in sorted order, so preserve that
fileslist = PackageFile.objects.filter(pkg=pkg).order_by('id')
@@ -185,14 +185,14 @@ def files(request, name, repo, arch):
def details_json(request, name, repo, arch):
- pkg = get_object_or_404(Package,
+ pkg = get_object_or_404(Package.objects.normal(),
pkgname=name, repo__name__iexact=repo, arch__name=arch)
to_json = json.dumps(pkg, ensure_ascii=False, cls=PackageJSONEncoder)
return HttpResponse(to_json, content_type='application/json')
def files_json(request, name, repo, arch):
- pkg = get_object_or_404(Package,
+ pkg = get_object_or_404(Package.objects.normal(),
pkgname=name, repo__name__iexact=repo, arch__name=arch)
# files are inserted in sorted order, so preserve that
fileslist = PackageFile.objects.filter(pkg=pkg).order_by('id')
@@ -213,7 +213,7 @@ def files_json(request, name, repo, arch):
def download(request, name, repo, arch):
- pkg = get_object_or_404(Package,
+ pkg = get_object_or_404(Package.objects.normal(),
pkgname=name, repo__name__iexact=repo, arch__name=arch)
url = get_mirror_url_for_download()
if not url:
diff --git a/packages/views/flag.py b/packages/views/flag.py
index dadadd1..edb3f09 100644
--- a/packages/views/flag.py
+++ b/packages/views/flag.py
@@ -49,7 +49,7 @@ def flaghelp(request):
@never_cache
def flag(request, name, repo, arch):
- pkg = get_object_or_404(Package,
+ pkg = get_object_or_404(Package.objects.normal(),
pkgname=name, repo__name__iexact=repo, arch__name=arch)
if pkg.flag_date is not None:
# already flagged. do nothing.
@@ -158,7 +158,7 @@ def flag_confirmed(request, name, repo, arch):
@permission_required('main.change_package')
def unflag(request, name, repo, arch):
- pkg = get_object_or_404(Package,
+ pkg = get_object_or_404(Package.objects.normal(),
pkgname=name, repo__name__iexact=repo, arch__name=arch)
pkg.flag_date = None
pkg.save()
@@ -166,7 +166,7 @@ def unflag(request, name, repo, arch):
@permission_required('main.change_package')
def unflag_all(request, name, repo, arch):
- pkg = get_object_or_404(Package,
+ pkg = get_object_or_404(Package.objects.normal(),
pkgname=name, repo__name__iexact=repo, arch__name=arch)
# find all packages from (hopefully) the same PKGBUILD
pkgs = Package.objects.filter(pkgbase=pkg.pkgbase,