From e3c00e4c1e0d64c8b0f0b04e6e7a7e1a308099f2 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Wed, 27 Jul 2011 18:32:19 +0300 Subject: [PATCH] Fixed TypeError that occurs without request data. If no request data gets sent, allowed_extra_fields is a set and can't be joined to a tuple using the + operator. --- djangorestframework/resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/djangorestframework/resources.py b/djangorestframework/resources.py index f4a2ab147..99c452440 100644 --- a/djangorestframework/resources.py +++ b/djangorestframework/resources.py @@ -111,7 +111,7 @@ class FormResource(Resource): # To get around this case we revalidate with some fake data. if fake_data: data[fake_data] = '_fake_data' - allowed_extra_fields = allowed_extra_fields + ('_fake_data',) + allowed_extra_fields = tuple(allowed_extra_fields) + ('_fake_data',) bound_form = self.get_bound_form(data, files)