hooks/workflow.py
changeset 8483 4ba11607d84a
parent 8190 2a3c1b787688
child 8556 bbe0d6985e59
equal deleted inserted replaced
8469:82272decfa99 8483:4ba11607d84a
   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