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

Fix replaced instance being used when pk-only optimization raises AttributeError#5747

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

Conversation

@ryan-copperleaf
Copy link
Contributor

@ryan-copperleafryan-copperleaf commentedJan 15, 2018
edited
Loading

Not sure if this is the right place to put the test or where the situation comes up in the real world when not using ORM hacks (like how we found it), but itdoes test the thing, and the thingis broken in a case that it appears to be intended to handle.

Not sure if this is the right place to put the test or where the situation comes up in the real world when not using ORM hacks (like how we found it), but it *does* test the thing.
@xordoquy
Copy link
Contributor

Hi,
nice catch and nice work !
I think I would rather catch theObjectDoesNotExist exception and return an explicitNone instead of the fallback on the standard case as it'll do the same thing and possibly perform another DB query.

@ryan-copperleaf
Copy link
ContributorAuthor

get_attribute isalready catching theObjectDoesNotExist exception, though; theAttributeError comes when a deeper lookup tries to access an attribute onNone.

@rpkilbyrpkilby self-assigned thisJan 16, 2018
@carltongibsoncarltongibson added this to the3.8.3 Release milestoneApr 24, 2018
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.

Hi@ryan-copperleaf. Thank you for this. What a horrible little bug.

@carltongibsoncarltongibson merged commita11938c intoencode:masterApr 24, 2018
@rpkilbyrpkilby modified the milestones:3.8.3 Release,3.9 ReleaseAug 29, 2018
pchiquet pushed a commit to pchiquet/django-rest-framework that referenced this pull requestNov 17, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@carltongibsoncarltongibsoncarltongibson approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

3.9.0 Release

Development

Successfully merging this pull request may close these issues.

4 participants

@ryan-copperleaf@xordoquy@carltongibson@rpkilby

[8]ページ先頭

©2009-2025 Movatter.jp