[extensions-web] extensions: Try shell_version before version_tag



commit 0a947c6588ae957cd0538666f54fcdf010c094c8
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon May 21 13:52:30 2012 -0400

    extensions: Try shell_version before version_tag
    
    This makes the version_tag very, very legacy. The shell will go through
    the shell_version interface now.

 sweettooth/extensions/views.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/sweettooth/extensions/views.py b/sweettooth/extensions/views.py
index df69ed1..a99882a 100644
--- a/sweettooth/extensions/views.py
+++ b/sweettooth/extensions/views.py
@@ -60,13 +60,13 @@ def find_extension_version_from_params(extension, params):
     vpk = params.get('version_tag', '')
     shell_version = params.get('shell_version', '')
 
-    if vpk:
+    if shell_version:
+        return grab_proper_extension_version(extension, shell_version)
+    elif vpk:
         try:
             return extension.visible_versions.get(pk=int(vpk))
         except models.ExtensionVersion.DoesNotExist:
             return None
-    elif shell_version:
-        return grab_proper_extension_version(extension, shell_version)
     else:
         return None
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]