From a414ac0954041dae844dae7433b39579e216dfbb Mon Sep 17 00:00:00 2001 From: Dominik Moritz Date: Thu, 27 Sep 2012 11:34:25 +0100 Subject: [PATCH] Transaction rollback in create --- ckanext/datastore/db.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ckanext/datastore/db.py b/ckanext/datastore/db.py index 76d7c2c2758..10434a6e8dd 100644 --- a/ckanext/datastore/db.py +++ b/ckanext/datastore/db.py @@ -851,6 +851,7 @@ def create(context, data_dict): else: raise except Exception, e: + trans.rollback() if 'due to statement timeout' in str(e): raise ValidationError({ 'query': ['Query took too long']