[extensions-web] review: Don't 500 out on new extensions



commit 3373b8e954539eb4eb7104803ef39af492b37677
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Jun 8 03:14:41 2012 -0400

    review: Don't 500 out on new extensions

 sweettooth/review/views.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/sweettooth/review/views.py b/sweettooth/review/views.py
index 53fe3a9..e7b54b2 100644
--- a/sweettooth/review/views.py
+++ b/sweettooth/review/views.py
@@ -398,6 +398,9 @@ def should_auto_approve(changes, extension=None):
     return True
 
 def should_auto_reject(old_version, new_version):
+    if old_version is None:
+        return False
+
     if old_version.status != models.STATUS_UNREVIEWED:
         return False
 



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