server/hooks.py
changeset 2456 aa25d6b244c8
parent 2241 fcf08ac5f8c0
child 2463 5200c0f7d2d5
--- a/server/hooks.py	Thu Jul 23 15:17:11 2009 +0200
+++ b/server/hooks.py	Thu Jul 23 15:28:41 2009 +0200
@@ -33,6 +33,8 @@
         entity['creation_date'] = datetime.now()
     if not 'modification_date' in entity:
         entity['modification_date'] = datetime.now()
+    if not 'cwuri' in entity:
+        entity['cwuri'] = session.base_url() + u'eid/%s' % entity.eid
 
 def setmtime_before_update_entity(session, entity):
     """update an entity -> set modification date"""