misc/migration/3.15.0_Any.py
author Rabah Meradi <rabah.meradi@logilab.fr>
Tue, 15 Dec 2015 08:55:58 +0100
changeset 10973 0939ad2edf63
parent 8483 4ba11607d84a
permissions -rw-r--r--
[adapters] Use an adapter for serializing entities to a bare python structure which may be used for e.g. JSON export or other and allow to have different serializations for each entity types. Closes #6378035

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