From 7c6240d1fb7f1581560c5d6ab8a9119d0afb112a Mon Sep 17 00:00:00 2001 From: Yann Malet Date: Tue, 16 Aug 2011 10:21:01 +0200 Subject: [PATCH] remove 2 transactions statement that has been add later down the road --- cms/models/pagemodel.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cms/models/pagemodel.py b/cms/models/pagemodel.py index 228de87cb8d..72b2e17b961 100644 --- a/cms/models/pagemodel.py +++ b/cms/models/pagemodel.py @@ -14,7 +14,6 @@ from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse from django.db.models import Q -from django.db.models.fields.related import OneToOneRel from django.shortcuts import get_object_or_404 from django.utils.translation import get_language, ugettext_lazy as _ from menus.menu_pool import menu_pool @@ -400,7 +399,6 @@ def publish(self): """ # Publish can only be called on moderated and draft pages if not self.publisher_is_draft: - transaction.rollback() return # publish, but only if all parents are published!! @@ -465,7 +463,7 @@ def publish(self): old_public = Page.objects.get(pk=old_public.pk) old_public.move_to(None, 'last-child') # moving the object out of the way berore deleting works, but why? - # finally delete the old public page + # finally delete the old public page old_public.delete() # page was published, check if there are some childs, which are waiting @@ -481,8 +479,6 @@ def publish(self): import cms.signals as cms_signals cms_signals.post_publish.send(sender=Page, instance=self) - transaction.commit() - return published def delete(self):