Skip to content

Commit 3088557

Browse files
authored
Skip setting a default page if the default is already set to the same value.
1 parent 9a25fad commit 3088557

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

CHANGES.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Changelog
55
1.16 (unreleased)
66
-----------------
77

8+
- Skip setting a default page if the default is already set to the same value.
9+
[mamico]
810
- Fixed data extraction of Archetypes ATFilefields to concatenate all `Pdata` chunks, when the FileField data was still stored in Filestorage and not not migrated to use blobstorage (using plone.app.blobs).
911
[@jnptk]
1012

src/collective/exportimport/import_other.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,12 @@ def import_default_pages(self, data):
575575
continue
576576

577577
if six.PY2:
578+
if obj.getDefaultPage() == default_page.encode("utf-8"):
579+
continue
578580
obj.setDefaultPage(default_page.encode("utf-8"))
579581
else:
582+
if obj.getDefaultPage() == default_page:
583+
continue
580584
obj.setDefaultPage(default_page)
581585
logger.debug(
582586
u"Set %s as default page for %s", default_page, obj.absolute_url()

0 commit comments

Comments
 (0)