From 9739de9244cf81682485ae4e29c8f11060d3aee5 Mon Sep 17 00:00:00 2001 From: esteele Date: Fri, 18 Sep 2015 14:54:22 +0200 Subject: [PATCH] Only try to convert strings. --- plone/app/upgrade/v50/betas.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/plone/app/upgrade/v50/betas.py b/plone/app/upgrade/v50/betas.py index cfd2bc54..e08bcbe0 100644 --- a/plone/app/upgrade/v50/betas.py +++ b/plone/app/upgrade/v50/betas.py @@ -497,17 +497,18 @@ def to50rc3(context): portal._delProperty(p) properties_to_migrate = ['external_links_open_new_window', - 'mark_special_links', + 'mark_special_links', 'calendar_starting_year', 'calendar_future_years_available', - 'redirect_links'] + 'redirect_links'] for p in properties_to_migrate: if site_properties.hasProperty(p): value = site_properties.getProperty(p) - if value.lower() == 'true': - value = True - elif value.lower() == 'false': - value = False + if isinstance(value, basestring): + if value.lower() == 'true': + value = True + elif value.lower() == 'false': + value = False try: registry['plone.%s' % p] = value site_properties._delProperty(p)