sobjects/ldapparser.py
changeset 8483 4ba11607d84a
parent 8434 39c5bb4dcc59
child 8535 268b6349baf3
--- a/sobjects/ldapparser.py	Tue Jul 17 17:16:28 2012 +0200
+++ b/sobjects/ldapparser.py	Tue Jul 17 12:24:46 2012 +0200
@@ -81,7 +81,7 @@
             attrs = dict( (k, v) for k, v in attrs.iteritems()
                           if v != getattr(entity, k))
             if attrs:
-                entity.set_attributes(**attrs)
+                entity.cw_set(**attrs)
                 self.notify_updated(entity)
 
     def ldap2cwattrs(self, sdict, tdict=None):
@@ -110,7 +110,7 @@
         if entity.__regid__ == 'EmailAddress':
             return
         groups = [self._get_group(n) for n in self.source.user_default_groups]
-        entity.set_relations(in_group=groups)
+        entity.cw_set(in_group=groups)
         self._process_email(entity, sourceparams)
 
     def is_deleted(self, extid, etype, eid):
@@ -137,9 +137,9 @@
                 email = self.extid2entity(emailextid, 'EmailAddress',
                                           address=emailaddr)
                 if entity.primary_email:
-                    entity.set_relations(use_email=email)
+                    entity.cw_set(use_email=email)
                 else:
-                    entity.set_relations(primary_email=email)
+                    entity.cw_set(primary_email=email)
             elif self.sourceuris:
                 # pop from sourceuris anyway, else email may be removed by the
                 # source once import is finished