[extensions-web] views: Roll back on invalid zip file data as well



commit 07186ec40996b145ce1f19dd4fa9cd4ed8de7df0
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Jan 18 11:18:38 2013 -0500

    views: Roll back on invalid zip file data as well

 sweettooth/extensions/views.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/sweettooth/extensions/views.py b/sweettooth/extensions/views.py
index 70b8d2d..ad2a4f2 100644
--- a/sweettooth/extensions/views.py
+++ b/sweettooth/extensions/views.py
@@ -363,6 +363,7 @@ def create_version(request, file_source):
         uuid = metadata['uuid']
     except (models.InvalidExtensionData, KeyError), e:
         messages.error(request, "Invalid extension data: %s" % (e.message,))
+        transaction.rollback()
         return None, []
 
     try:



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