[extensions-web] extensions: Use "version_tag" for a version PK consistently



commit b2b2a849ce2d7f494fba4f7d9dd751239918eeba
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Apr 13 11:35:18 2012 -0400

    extensions: Use "version_tag" for a version PK consistently

 sweettooth/extensions/tests.py |    4 ++--
 sweettooth/extensions/views.py |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/sweettooth/extensions/tests.py b/sweettooth/extensions/tests.py
index b586a64..4057dc1 100644
--- a/sweettooth/extensions/tests.py
+++ b/sweettooth/extensions/tests.py
@@ -472,10 +472,10 @@ class UpdateVersionTest(TestCase):
         downgrade_pk = models.Extension.objects.get(uuid=self.downgrade_uuid).latest_version.pk
 
         self.full_expected = { self.upgrade_uuid: dict(operation='upgrade',
-                                                       version=upgrade_pk),
+                                                       version_tag=upgrade_pk),
                                self.reject_uuid: dict(operation='blacklist'),
                                self.downgrade_uuid: dict(operation='downgrade',
-                                                         version=downgrade_pk) }
+                                                         version_tag=downgrade_pk) }
 
     def grab_response(self, installed):
         post_data = dict(installed=json.dumps(installed))
diff --git a/sweettooth/extensions/views.py b/sweettooth/extensions/views.py
index 291954d..aa066c6 100644
--- a/sweettooth/extensions/views.py
+++ b/sweettooth/extensions/views.py
@@ -105,11 +105,11 @@ def shell_update(request):
 
         elif version < latest_version.version:
             operations[uuid] = dict(operation="upgrade",
-                                    version=extension.latest_version.pk)
+                                    version_tag=extension.latest_version.pk)
 
         elif version_obj.status in models.REJECTED_STATUSES:
             operations[uuid] = dict(operation="downgrade",
-                                    version=extension.latest_version.pk)
+                                    version_tag=extension.latest_version.pk)
 
     return operations
 



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