Remove redundant check if method=='DELETE'

This commit is contained in:
Marko Tibold 2012-10-21 22:23:54 +02:00
parent d53ee8a10c
commit c30712a5c8

View File

@ -288,7 +288,7 @@ class BrowsableAPIRenderer(BaseRenderer):
fields[k] = forms.CharField()
OnTheFlyForm = type("OnTheFlyForm", (forms.Form,), fields)
if obj and not view.request.method == 'DELETE': # Don't fill in the form when the object is deleted
if obj:
data = serializer.data
form_instance = OnTheFlyForm(data)
return form_instance