statuschange form view only works w/ one entity, fix selector accordingly stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 21 Sep 2009 11:41:45 +0200
branchstable
changeset 3335 3c035436ca65
parent 3334 8d831c02da9a
child 3336 d77aa97f95f9
statuschange form view only works w/ one entity, fix selector accordingly
web/views/workflow.py
--- a/web/views/workflow.py	Mon Sep 21 11:41:17 2009 +0200
+++ b/web/views/workflow.py	Mon Sep 21 11:41:45 2009 +0200
@@ -52,7 +52,8 @@
 class ChangeStateFormView(form.FormViewMixIn, view.EntityView):
     id = 'statuschange'
     title = _('status change')
-    __select__ = implements(IWorkflowable) & match_form_params('treid')
+    __select__ = (one_line_rset() & implements(IWorkflowable)
+                  & match_form_params('treid'))
 
     def cell_call(self, row, col):
         entity = self.rset.get_entity(row, col)