Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix normalized queryColor keys.

  • Loading branch information...
commit 0068e1b617dff454a770f8aef2b459c2f471c2ab 1 parent 13a9471
@Martronic-SA Martronic-SA authored
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()
Please sign in to comment.
Something went wrong with that request. Please try again.