When updating bundles, we get a spurious error message in the
MultiplePatchForm; it's performing validation on the blank form data.
This change only passes the post data to the MuliplePatchForm if we
detect (through data['form']) that it was the MultiplePatchForm that was
submitted.
This fixes the current testsuite failure.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
user = request.user
properties_form = None
if project.is_editable(user):
- properties_form = MultiplePatchForm(project, data = data)
+
+ # we only pass the post data to the MultiplePatchForm if that was
+ # the actual form submitted
+ data_tmp = None
+ if data and data.get('form', '') == 'patchlistform':
+ data_tmp = data
+
+ properties_form = MultiplePatchForm(project, data = data_tmp)
if request.method == 'POST' and data.get('form') == 'patchlistform':
action = data.get('action', '').lower()