misc/migration/3.15.0_Any.py
author Pierre-Yves David <pierre-yves.david@logilab.fr>
Fri, 22 Mar 2013 17:47:45 +0100
changeset 8762 6b397a0ba1d6
parent 8483 4ba11607d84a
permissions -rw-r--r--
[transaction] explicit Transaction cnxset attribute The Transaction object have a lot more attribute that those previously declared in __init__. They are just dynamically assigned in Session code. This changeset explicit the ``cnxset`` and ``mode`` attribute declaration.

sync_schema_props_perms('EmailAddress')

for source in rql('CWSource X WHERE X type "ldapuser"').entities():
    config = source.dictconfig
    host = config.pop('host', u'ldap')
    protocol = config.pop('protocol', u'ldap')
    source.cw_set(url=u'%s://%s' % (protocol, host))
    source.update_config(skip_unknown=True, **config)

commit()