mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-10 19:56:59 +03:00
Remove redundant check if method=='DELETE'
This commit is contained in:
parent
d53ee8a10c
commit
c30712a5c8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user