-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes instance check in ListSerializer.to_representation (#8726) #8727
Conversation
Some developer will use custom |
Shouldn't this only need to check the |
Yes, I forgot this. |
@@ -681,7 +681,7 @@ def to_representation(self, data): | |||
""" | |||
# Dealing with nested relationships, data can be a Manager, | |||
# so, first get a queryset from the Manager if needed | |||
iterable = data.all() if isinstance(data, models.Manager) else data | |||
iterable = data.all() if isinstance(data, models.manager.BaseManager) else data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I triggered the CI, can you please pull from main branch again? the bug was not verify able in the test suite, would you mind investigate further to figure out if we can add some relevant test for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I triggered the CI, can you please pull from main branch again? the bug was not verify able in the test suite, would you mind investigate further to figure out if we can add some relevant test for this?
Yes, but it may take a while.
I'm a little hungry. I'm going to cook dinner first. 😋
Is that what you mean? ( My English is not good )
- Append the test case.
- Merge this branch to master in my fork ( I'm not sure about this ).
- Then pull request again (
encode:master
from954-ivory:master
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant pull from encode:master to your working branch for this PR 954-ivory:master so that the recently updated versions in CI could reflect here. And some unit tests :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the rebase, now just appending/adding additional test cases would be really great
4471c05
to
c9b6b02
Compare
there are some issues with pre commit, can you check and fix them? you might need to run flake8 locally |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to fix nose deprecation warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this part was creating precommit problems
all green now! now another round of review before merge |
Issue: #8726