Skip to content

Instantly share code, notes, and snippets.

@xordoquy
Created June 23, 2017 23:58
Show Gist options
  • Save xordoquy/933b0592f3cb22daf97dbb7a1c0356d8 to your computer and use it in GitHub Desktop.
Save xordoquy/933b0592f3cb22daf97dbb7a1c0356d8 to your computer and use it in GitHub Desktop.
>>> from invoices.api.serializers import User
>>> u = User(many=True)
>>> print(u.parent)
None
>>> type(u.child.parent)
<class 'rest_framework.serializers.ListSerializer'>
>>> u2 = User()
>>> print(u2.parent)
None
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment