[extensions-web] extensions: Remove support for special case 'latest' as version_tag
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] extensions: Remove support for special case 'latest' as version_tag
- Date: Thu, 29 Mar 2012 21:49:03 +0000 (UTC)
commit 2233bb3acfcbea72f442760cffeb22b1cb8fc78f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Mar 29 10:00:18 2012 -0400
extensions: Remove support for special case 'latest' as version_tag
sweettooth/extensions/views.py | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/sweettooth/extensions/views.py b/sweettooth/extensions/views.py
index 68f53d9..53ee0c3 100644
--- a/sweettooth/extensions/views.py
+++ b/sweettooth/extensions/views.py
@@ -23,16 +23,11 @@ from utils import render
def shell_download(request, uuid):
pk = request.GET['version_tag']
- if pk == 'latest':
- extension = get_object_or_404(models.Extension, uuid=uuid)
- version = extension.latest_version
-
- else:
- version = get_object_or_404(models.ExtensionVersion, pk=pk)
- extension = version.extension
+ version = get_object_or_404(models.ExtensionVersion, pk=pk)
+ extension = version.extension
- if version.extension.uuid != uuid:
- raise Http404()
+ if version.extension.uuid != uuid:
+ raise Http404()
if version.status != models.STATUS_ACTIVE:
return HttpResponseForbidden()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]