Use correct attribute for renaming content
authorThierry Florac <thierry.florac@onf.fr>
Mon, 25 Jun 2018 16:28:17 +0200
changeset 732 b4e70a25236a
parent 731 a39cedc655ff
child 733 d6848b527299
child 740 d6548428279d
child 741 bd623ade162d
Use correct attribute for renaming content
src/pyams_content/shared/common/zmi/rename.py
--- a/src/pyams_content/shared/common/zmi/rename.py	Mon Jun 25 16:09:33 2018 +0200
+++ b/src/pyams_content/shared/common/zmi/rename.py	Mon Jun 25 16:28:17 2018 +0200
@@ -88,7 +88,7 @@
     def update_content(self, content, data):
         data = data.get(self, data)
         old_name = content.__name__
-        new_name = data['__name__'] = translate_string(content.__name__, spaces='-', keep_chars='-')
+        new_name = data['__name__'] = translate_string(data['__name__'], spaces='-', keep_chars='-')
         changes = super(SiteContainerRenameForm, self).update_content(content, data)
         if changes:
             # revert rename to adjust container properties