misc/migration/3.15.0_Any.py
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 17 Jul 2012 12:24:46 +0200
changeset 8483 4ba11607d84a
parent 8251 df46bf02b107
permissions -rw-r--r--
[entity api] unify set_attributes / set_relations into a cw_set method. Closes #2423719 Allowing similar usage as create_entity/cw_instantiate. Update cw code base to remove deprecated calls.

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()