equal
deleted
inserted
replaced
333 if self._cw.added_in_transaction(self.eidfrom): |
333 if self._cw.added_in_transaction(self.eidfrom): |
334 # new entity, not needed |
334 # new entity, not needed |
335 return |
335 return |
336 entity = self._cw.entity_from_eid(self.eidfrom) |
336 entity = self._cw.entity_from_eid(self.eidfrom) |
337 try: |
337 try: |
338 entity.set_attributes(modification_date=datetime.now()) |
338 entity.cw_set(modification_date=datetime.now()) |
339 except RepositoryError, ex: |
339 except RepositoryError, ex: |
340 # usually occurs if entity is coming from a read-only source |
340 # usually occurs if entity is coming from a read-only source |
341 # (eg ldap user) |
341 # (eg ldap user) |
342 self.warning('cant change modification date for %s: %s', entity, ex) |
342 self.warning('cant change modification date for %s: %s', entity, ex) |
343 |
343 |