diff MoinMoin/items/__init__.py @ 2085:7f4520c9b5f1

solves Issue #328, multiple name must be unique with all names, added a function to validatename which takes care of the issue
author Ashutosh Singla <ashu1461@gmail.com>
date Tue, 09 Apr 2013 22:33:42 +0530
parents a52e0af95e41
children 129929623809
line wrap: on
line diff
--- a/MoinMoin/items/__init__.py	Tue Apr 09 15:14:08 2013 +0530
+++ b/MoinMoin/items/__init__.py	Tue Apr 09 22:33:42 2013 +0530
@@ -727,7 +727,8 @@
                     # break them
                     return "OK"
             form = self.ModifyForm.from_request(request)
-            if form.validate():
+            state = dict(name=self.name, itemid=self.meta.get(ITEMID))
+            if form.validate(state):
                 meta, data, contenttype_guessed, comment = form._dump(self)
                 contenttype_qs = request.values.get('contenttype')
                 try: