Updated "update_content" methods for last PyAMS_form package
authorThierry Florac <thierry.florac@onf.fr>
Fri, 30 Mar 2018 15:34:15 +0200
changeset 115 12c5513ee71a
parent 114 d00688ea8124
child 116 89df87450c0c
Updated "update_content" methods for last PyAMS_form package
src/pyams_security/views/userfolder.py
src/pyams_security/zmi/plugin/group.py
src/pyams_security/zmi/plugin/userfolder.py
--- a/src/pyams_security/views/userfolder.py	Wed Mar 28 16:03:21 2018 +0200
+++ b/src/pyams_security/views/userfolder.py	Fri Mar 30 15:34:15 2018 +0200
@@ -96,6 +96,7 @@
         return User()
 
     def update_content(self, user, data):
+        data = data.get(self, data)
         user.login = data.get('login')
         user.email = data.get('email')
         user.firstname = data.get('firstname')
--- a/src/pyams_security/zmi/plugin/group.py	Wed Mar 28 16:03:21 2018 +0200
+++ b/src/pyams_security/zmi/plugin/group.py	Fri Mar 30 15:34:15 2018 +0200
@@ -244,6 +244,7 @@
         return Group()
 
     def update_content(self, group, data):
+        data = data.get(self, data)
         group.group_id = data.get('group_id')
         group.title = data.get('title')
         group.description = data.get('description')
--- a/src/pyams_security/zmi/plugin/userfolder.py	Wed Mar 28 16:03:21 2018 +0200
+++ b/src/pyams_security/zmi/plugin/userfolder.py	Fri Mar 30 15:34:15 2018 +0200
@@ -285,6 +285,7 @@
         return User()
 
     def update_content(self, user, data):
+        data = data.get(self, data)
         user.login = data.get('login')
         user.email = data.get('email')
         user.firstname = data.get('firstname')