Skip to content

Commit

Permalink
remove 2 transactions statement that has been add later down the road
Browse files Browse the repository at this point in the history
  • Loading branch information
yml committed Aug 16, 2011
1 parent 588a635 commit 7c6240d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions cms/models/pagemodel.py
Expand Up @@ -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
Expand Down Expand Up @@ -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!!
Expand Down Expand Up @@ -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
Expand All @@ -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):
Expand Down

0 comments on commit 7c6240d

Please sign in to comment.