Skip to content

Commit

Permalink
Only try to convert strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
esteele committed Sep 18, 2015
1 parent 4e5cf9e commit 9739de9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions plone/app/upgrade/v50/betas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9739de9

Please sign in to comment.