[views] GetConfiguration work directly with a TC or a PE draft
authorDavid Douard <david.douard@logilab.fr>
Thu, 13 Nov 2014 14:56:29 +0100
changeset 1753 2fc1207a3ba7
parent 1752 31c34cf9f19f
child 1754 e541bef11cff
[views] GetConfiguration work directly with a TC or a PE
views/rest.py
--- a/views/rest.py	Thu Nov 13 14:55:11 2014 +0100
+++ b/views/rest.py	Thu Nov 13 14:56:29 2014 +0100
@@ -35,13 +35,12 @@
 
 class GetConfiguration(json.JsonEntityView):
     __regid__ = 'apycot.get_configuration'
-    __select__ = is_instance('TestConfig') & match_form_params('environment')
+    __select__ = is_instance('TestConfig', 'ProjectEnvironment')
 
     def call(self):
         data = []
-        env = self._cw.entity_from_eid(self._cw.form['environment'])
-        for tconfig in self.cw_rset.entities():
-            data.append(tconfig.apycot_configuration(env))
+        for entity in self.cw_rset.entities():
+            data.append(entity.apycot_configuration())
         self.wdata(data)