[extensions-web] views: Fix upgrade operations output
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] views: Fix upgrade operations output
- Date: Tue, 28 May 2013 23:05:28 +0000 (UTC)
commit 938661b735e2b09eb8e8146ee7b188bdf527535e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue May 28 19:04:37 2013 -0400
views: Fix upgrade operations output
We only want to emit blacklist if there's no version when the
existing version was rejected.
sweettooth/extensions/views.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/sweettooth/extensions/views.py b/sweettooth/extensions/views.py
index 26f60e1..f08ad42 100644
--- a/sweettooth/extensions/views.py
+++ b/sweettooth/extensions/views.py
@@ -107,12 +107,13 @@ def shell_update(request):
proper_version = grab_proper_extension_version(extension, shell_version)
- if proper_version is None:
- operations[uuid] = "blacklist"
- elif version < proper_version.version:
+ if version < proper_version.version:
operations[uuid] = "upgrade"
elif version_obj.status == models.STATUS_REJECTED:
- operations[uuid] = "downgrade"
+ if proper_version is not None:
+ operations[uuid] = "downgrade"
+ else:
+ operations[uuid] = "blacklist"
return operations
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]