mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-30 01:46:24 +01:00
Merge branch 'kaedroho-issue-756'
This commit is contained in:
commit
c84876b2bb
@ -24,6 +24,7 @@ Changelog
|
||||
* Fix: Image uploader now accepts JPEG images that PIL reports as being in MPO format
|
||||
* Fix: Multiple checkbox fields on form-builder forms did not correctly save multiple values
|
||||
* Fix: Editing a page's slug and saving it without publishing could sometimes cause the URL paths of child pages to be corrupted
|
||||
* Fix: 'latest_revision_created_at' was being cleared on page publish, causing the page to drop to the bottom of explorer listings
|
||||
|
||||
0.7 (09.10.2014)
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
@ -40,6 +40,8 @@ Bug fixes
|
||||
* Image uploader now accepts JPEG images that PIL reports as being in MPO format
|
||||
* Multiple checkbox fields on form-builder forms did not correctly save multiple values
|
||||
* Editing a page's slug and saving it without publishing could sometimes cause the URL paths of child pages to be corrupted
|
||||
* ``latest_revision_created_at`` was being cleared on page publish, causing the page to drop to the bottom of explorer listings
|
||||
|
||||
|
||||
Upgrade considerations
|
||||
======================
|
||||
|
@ -1037,6 +1037,7 @@ class PageRevision(models.Model):
|
||||
obj.has_unpublished_changes = self.page.has_unpublished_changes
|
||||
obj.owner = self.page.owner
|
||||
obj.locked = self.page.locked
|
||||
obj.latest_revision_created_at = self.page.latest_revision_created_at
|
||||
|
||||
return obj
|
||||
|
||||
|
@ -620,3 +620,22 @@ class TestIssue735(TestCase):
|
||||
# Check that the christmas events url path updated correctly
|
||||
new_christmas_event = EventPage.objects.get(id=christmas_event.id)
|
||||
self.assertEqual(new_christmas_event.url_path, '/home/old-events/christmas/')
|
||||
|
||||
|
||||
class TestIssue756(TestCase):
|
||||
"""
|
||||
Issue 756 reports that the latest_revision_created_at
|
||||
field was getting clobbered whenever a revision was published
|
||||
"""
|
||||
def test_publish_revision_doesnt_remove_latest_revision_created_at(self):
|
||||
# Create a revision
|
||||
revision = Page.objects.get(id=1).save_revision()
|
||||
|
||||
# Check that latest_revision_created_at is set
|
||||
self.assertIsNotNone(Page.objects.get(id=1).latest_revision_created_at)
|
||||
|
||||
# Publish the revision
|
||||
revision.publish()
|
||||
|
||||
# Check that latest_revision_created_at is still set
|
||||
self.assertIsNotNone(Page.objects.get(id=1).latest_revision_created_at)
|
||||
|
Loading…
Reference in New Issue
Block a user