From 77b8cfadc77254e30fdfb687fd8ada4eaa00c4f9 Mon Sep 17 00:00:00 2001 From: Pablo Hoffman Date: Thu, 29 Oct 2009 13:35:32 -0200 Subject: [PATCH] changed odd logic in if statement --- scrapy/http/request/form.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scrapy/http/request/form.py b/scrapy/http/request/form.py index e5fefe880..f7be9c088 100644 --- a/scrapy/http/request/form.py +++ b/scrapy/http/request/form.py @@ -57,9 +57,9 @@ class FormRequest(Request): for v2 in v if hasattr(v, '__iter__') else [v]: form.new_control('text', k, {'value': v2}) - if not dont_click: - url, body, headers = form.click_request_data(**(clickdata or {})) - else: + if dont_click: url, body, headers = form._switch_click('request_data') + else: + url, body, headers = form.click_request_data(**(clickdata or {})) return cls(url, method=form.method, body=body, headers=headers, **kwargs)