server/hooks.py
changeset 2463 5200c0f7d2d5
parent 2456 aa25d6b244c8
child 2603 e47d63351891
--- a/server/hooks.py	Fri Jul 24 09:28:59 2009 +0200
+++ b/server/hooks.py	Fri Jul 24 09:30:04 2009 +0200
@@ -34,7 +34,8 @@
     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
+        if not session.get_shared_data('do-not-insert-cwuri'):
+            entity['cwuri'] = session.base_url() + u'eid/%s' % entity.eid
 
 def setmtime_before_update_entity(session, entity):
     """update an entity -> set modification date"""