Permalink
Browse files

Fix normalized queryColor keys.

  • Loading branch information...
1 parent 13a9471 commit 0068e1b617dff454a770f8aef2b459c2f471c2ab @Martronic-SA Martronic-SA committed Apr 24, 2012
Showing with 7 additions and 3 deletions.
  1. +7 −3 Solgema/fullcalendar/upgrades/migrations.py
View
10 Solgema/fullcalendar/upgrades/migrations.py
@@ -140,8 +140,12 @@ def upgrade210(context):
catalog = getToolByName(context, 'portal_catalog')
for topic in [a.getObject() for a in catalog.searchResults(portal_type="Topic")]:
calendar = interfaces.ISolgemaFullcalendarProperties(topic, None)
+ newColors = {}
if calendar:
- for k,v in queryColors.items():
+ for k,v in calendar.queryColors.items():
+ colDict = {}
for l,w in v.items():
- w = safe_unicode(w)
- v[l] = str(component.queryUtility(IURLNormalizer).normalize(w))
+ l = safe_unicode(l)
+ colDict[str(component.queryUtility(IURLNormalizer).normalize(l))] = w
+ newColors[k] = colDict.copy()
+ calendar.queryColors = newColors.copy()

0 comments on commit 0068e1b

Please sign in to comment.