Skip to content

Conversation

@Boomerangz
Copy link
Contributor

Depth should reduce

Depth should reduce
@jpadilla
Copy link
Contributor

jpadilla commented Apr 9, 2015

@Boomerangz I think we need a bit more here to understand what's going on. What's the wrong current behavior and how does it compare with this. A test case might also be needed as well.

@Boomerangz
Copy link
Contributor Author

Ok. I'm sorry.
Some bug like this was fixed in issue
#2287
It was fixed in 2 lines of code. Depth was reducing on each level of nested serialization.
Now, in one of this lines depth isn't reducing.
My test case is totally similiar to the test case of the issue.
I set meta property depth=1, but when i check result i see full hierarchy of my models serialized

@jpadilla
Copy link
Contributor

@Boomerangz ah I see now. It seemed it was fixed in 80bacc5 last year but was probably left out during the serializer rewrite.

@jpadilla
Copy link
Contributor

@tomchristie this looks good to me as is, wanted to check with you if it might have removed for a reason or by accident.

@lovelydinosaur
Copy link
Contributor

Yup - surprised we made it this far without it!

lovelydinosaur added a commit that referenced this pull request Apr 27, 2015
Depth should reduce on nested ModelSerializer classes.
@lovelydinosaur lovelydinosaur merged commit 2eb9107 into encode:master Apr 27, 2015
@lovelydinosaur
Copy link
Contributor

Thanks @Boomerangz!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants