Commit 5d94d3c1 authored by Romain Courteaud's avatar Romain Courteaud

slapos_wechat: new id generator per node is used

parent 728f7de5
......@@ -7,7 +7,10 @@ integration_site = portal.restrictedTraverse(portal.portal_preferences.getPrefer
wechat_id = integration_site.getCategoryFromMapping('Causality/%s' % context.getId().replace('-', '_'))
if wechat_id != 'causality/%s' % context.getId().replace('-', '_'):
date, _ = wechat_id.split('-', 1)
# ok when using per day generator
date = wechat_id.split('-', 1)[0]
# and then switched to per day / per node generator
date = date.split('.', 1)[0]
return DateTime(date).toZone('UTC'), wechat_id
else:
return None, None
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment