web/controller.py
branchstable
changeset 2314 d03429ad82b2
parent 2202 cb374512949f
child 2381 caad2367d940
--- a/web/controller.py	Tue Jul 07 13:37:17 2009 +0200
+++ b/web/controller.py	Tue Jul 07 13:37:24 2009 +0200
@@ -182,11 +182,9 @@
         elif '__redirectpath' in self.req.form:
             # if redirect path was explicitly specified in the form, use it
             path = self.req.form['__redirectpath']
-            if self._edited_entity:
-                msg = newparams.get('__message', '')
-                msg += ' (<a href="%s">%s</a>)' % (
-                    self._edited_entity.absolute_url(),
-                    self.req._('click here to see created entity'))
+            if self._edited_entity and path != self._edited_entity.rest_path():
+                # XXX may be here on modification? if yes the message should be
+                # modified where __createdpath is detected (cw.web.request)
                 newparams['__createdpath'] = self._edited_entity.rest_path()
         elif self._after_deletion_path:
             # else it should have been set during form processing