Commit 080bd3d2 by Tom Christie

Add comment ref #2089

parent 084354d3
...@@ -515,6 +515,7 @@ class BrowsableAPIRenderer(BaseRenderer): ...@@ -515,6 +515,7 @@ class BrowsableAPIRenderer(BaseRenderer):
In the absence of the View having an associated form then return None. In the absence of the View having an associated form then return None.
""" """
# See issue #2089 for refactoring this.
serializer = getattr(data, 'serializer', None) serializer = getattr(data, 'serializer', None)
if serializer and not getattr(serializer, 'many', False): if serializer and not getattr(serializer, 'many', False):
instance = getattr(serializer, 'instance', None) instance = getattr(serializer, 'instance', None)
...@@ -562,6 +563,7 @@ class BrowsableAPIRenderer(BaseRenderer): ...@@ -562,6 +563,7 @@ class BrowsableAPIRenderer(BaseRenderer):
via standard HTML forms. via standard HTML forms.
(Which are typically application/x-www-form-urlencoded) (Which are typically application/x-www-form-urlencoded)
""" """
# See issue #2089 for refactoring this.
serializer = getattr(data, 'serializer', None) serializer = getattr(data, 'serializer', None)
if serializer and not getattr(serializer, 'many', False): if serializer and not getattr(serializer, 'many', False):
instance = getattr(serializer, 'instance', None) instance = getattr(serializer, 'instance', None)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment