hooks/workflow.py
changeset 11033 63d860a14a17
parent 10907 9ae707db5265
equal deleted inserted replaced
11032:38afb7e23c6c 11033:63d860a14a17
   318         if self._cw.added_in_transaction(self.eidfrom):
   318         if self._cw.added_in_transaction(self.eidfrom):
   319             # new entity, not needed
   319             # new entity, not needed
   320             return
   320             return
   321         entity = self._cw.entity_from_eid(self.eidfrom)
   321         entity = self._cw.entity_from_eid(self.eidfrom)
   322         try:
   322         try:
   323             entity.cw_set(modification_date=datetime.now())
   323             entity.cw_set(modification_date=datetime.utcnow())
   324         except RepositoryError as ex:
   324         except RepositoryError as ex:
   325             # usually occurs if entity is coming from a read-only source
   325             # usually occurs if entity is coming from a read-only source
   326             # (eg ldap user)
   326             # (eg ldap user)
   327             self.warning('cant change modification date for %s: %s', entity, ex)
   327             self.warning('cant change modification date for %s: %s', entity, ex)
   328 
   328