[extensions-web] Diff against the previous version, not the latest version
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] Diff against the previous version, not the latest version
- Date: Tue, 22 Nov 2011 23:09:31 +0000 (UTC)
commit 7891187e583377fcc378d40bbb1a6a0ade97710d
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Nov 22 18:09:17 2011 -0500
Diff against the previous version, not the latest version
sweettooth/review/views.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/sweettooth/review/views.py b/sweettooth/review/views.py
index 2b62cbc..4a5af66 100644
--- a/sweettooth/review/views.py
+++ b/sweettooth/review/views.py
@@ -108,11 +108,11 @@ def get_zipfiles(version):
extension = version.extension
new_zipfile = version.get_zipfile('r')
-
- if extension.latest_version is None:
+ if version.version == 1:
return None, new_zipfile
- old_zipfile = extension.latest_version.get_zipfile('r')
+ old_version = extension.versions.get(version=version.version-1)
+ old_zipfile = old_version.get_zipfile('r')
return old_zipfile, new_zipfile
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]