Return metadata on OPTION method for read-only views

Fixes #3808
This commit is contained in:
Mordy Ovits 2016-01-11 14:06:17 -05:00
parent 1c5dfc9c8d
commit a077095970

View File

@ -77,7 +77,7 @@ class SimpleMetadata(BaseMetadata):
the fields that are accepted for 'PUT' and 'POST' methods.
"""
actions = {}
for method in {'PUT', 'POST'} & set(view.allowed_methods):
for method in {'GET', 'PUT', 'POST'} & set(view.allowed_methods):
view.request = clone_request(request, method)
try:
# Test global permissions