Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Test Serializer exclude for declared fields#5599

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
carltongibson merged 2 commits intoencode:masterfromrpkilby:exclude-declared-fields
Nov 20, 2017

Conversation

@rpkilby
Copy link
Contributor

I'm not particularly inclined towards the change in behavior, but it was fairly trivial to implement.

Thoughts@xordoquy,@carltongibson?

@rpkilbyrpkilby added this to thev3.8 milestoneNov 15, 2017
@xordoquy
Copy link
Contributor

@rpkilby as said on#5596, I'm not in favor of this change. We could make the documentation a bit more explicit though.

naringas reacted with thumbs up emoji

@rpkilby
Copy link
ContributorAuthor

@xordoquy - agreed, I just whipped it up given how simple of a change it was. I've added another commit that raises anAssertionError instead.

@carltongibson
Copy link
Collaborator

For me, an assert here is fine. (Even “good” perhaps 🙂) I’m -1 on supporting the usage from#5596, as per discussion there.

It’s my birthday 🍰 today so I’ll leave you folks to decide what to do.

rpkilby reacted with hooray emoji

@rpkilbyrpkilbyforce-pushed theexclude-declared-fields branch from3578ba6 to4e7e728CompareNovember 20, 2017 01:16
Copy link
Collaborator

@carltongibsoncarltongibson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

OK, this is fine. I'm sure it will help someone. Let's have it.

@carltongibsoncarltongibson modified the milestones:v3.8,v3.7.4Nov 20, 2017
@carltongibsoncarltongibson merged commita3df1c1 intoencode:masterNov 20, 2017
@rpkilbyrpkilby deleted the exclude-declared-fields branchNovember 20, 2017 08:55
@virusdefender
Copy link
Contributor

virusdefender commentedDec 1, 2017
edited
Loading

It's great!

I have the same issue. When you redeclared some field, it won't be filtered.

carltongibson reacted with hooray emoji

georgebabey added a commit to openedx-unsupported/edx-analytics-data-api that referenced this pull requestAug 29, 2018
Unpinned a number of requirements so they would be upgraded as part of`make upgrade` as recommended by OEP-18. In particular the edx-enterprise-datadjango app was not pinning edx-drf-extensions which resulted in 2 differentversions of DRF in the requirements (one for enterprise-data and one for thisIDA).Upgrading DRF resulting in an assertion failure that was added in DRF 3.7.4```Cannot both declare the field 'created' and include it in the CourseProgramMetadataSerializer'exclude' option. Remove the field or, if inherited from a parent serializer, disable with `created = None`.```encode/django-rest-framework#5599Because the created date was being excluded, it is not needed in the CourseProgramMetadataSerializer andhas been removed.
pchiquet pushed a commit to pchiquet/django-rest-framework that referenced this pull requestNov 17, 2020
* Test current behavior of exclude+declared field* Assert declared fields are not present in exclude
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@carltongibsoncarltongibsoncarltongibson approved these changes

@xordoquyxordoquyAwaiting requested review from xordoquy

Assignees

No one assigned

Labels

Projects

None yet

Milestone

3.7.4 Release

Development

Successfully merging this pull request may close these issues.

ModelSerializer exclude won't work well when field duplicate declear in Serializer

4 participants

@rpkilby@xordoquy@carltongibson@virusdefender

[8]ページ先頭

©2009-2025 Movatter.jp