[Testbot] Plone 5.0 - Python 2.7 - Build # 2312 - Still failing! - 4 failure(s)

jenkins at plone.org jenkins at plone.org
Fri Apr 18 12:12:06 UTC 2014


-------------------------------------------------------------------------------
Plone 5.0 - Python 2.7 - Build # 2312 - Still Failing!
-------------------------------------------------------------------------------

http://jenkins.plone.org/job/plone-5.0-python-2.7/2312/


-------------------------------------------------------------------------------
CHANGES
-------------------------------------------------------------------------------

Repository: plone.app.upgrade
Branch: refs/heads/master
Date: 2014-04-18T13:22:31+02:00
Author: Johannes Raggam (thet) <raggam-nl at adm.at>
Commit: https://github.com/plone/plone.app.upgrade/commit/b98fb18de594cbdea9301ddea38fd7978a27e74f

Plone 5 upgrade: Respect previous installed plone.app.event when migrating first_weekday setting.

Files changed:
M CHANGES.txt
M plone/app/upgrade/v50/alphas.py

diff --git a/CHANGES.txt b/CHANGES.txt
index 74b9d2c..5b72df2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -3,7 +3,11 @@ Changelog
 
 1.3.7 (unreleased)
 ------------------
-  
+
+- Plone 5 upgrade: Respect previous installed plone.app.event when migrating
+  first_weekday setting.
+  [thet]
+
 - #12286 Need (Plone 4.0 upgrade) migration step for hidden static text
   portlets
   [anthonygerrard]
diff --git a/plone/app/upgrade/v50/alphas.py b/plone/app/upgrade/v50/alphas.py
index 115d108..4b8ac5f 100644
--- a/plone/app/upgrade/v50/alphas.py
+++ b/plone/app/upgrade/v50/alphas.py
@@ -39,12 +39,6 @@ def to50alpha1(context):
     if not qi.isProductInstalled('plone.app.event'):
         qi.installProduct('plone.app.event')
 
-    # migrate first weekday setting
-    portal_calendar = getattr(portal, 'portal_calendar', None)
-    if portal_calendar is not None:
-        first_weekday = getattr(portal.portal_calendar, 'firstweekday', 0)
-        portal.portal_registry['plone.app.event.first_weekday'] = first_weekday
-
     # update the default view of the Members folder
     migrate_members_default_view(portal)
 
@@ -83,6 +77,17 @@ def migrate_registry_settings(portal):
     registry['plone.types_not_searched'] = tuple(
         t for t in site_props.types_not_searched if t in portal_types)
 
+    # Migrate first weekday setting
+    # First, look, if plone.app.event < 2.0 was already installed.
+    first_weekday = registry.get('plone.app.event.first_weekday', None)
+    if first_weekday is None:
+        # Try to get the value from portal_calendar, if available.
+        portal_calendar = getattr(portal, 'portal_calendar', None)
+        first_weekday = getattr(portal_calendar, 'firstweekday', None)
+    if first_weekday is not None:
+        # Set it. Otherwise, let plone.app.event install routine set it.
+        registry['plone.first_weekday'] = first_weekday
+
 
 def migrate_members_default_view(portal):
     members = portal.get('Members')




-------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CHANGES.log
Type: application/octet-stream
Size: 2379 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140418/d315eed4/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 114172 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140418/d315eed4/attachment-0003.obj>


More information about the Testbot mailing list