Skip to content

Conversation

@gcbirzan
Copy link
Contributor

@gcbirzan gcbirzan commented Feb 23, 2018

This allows you to have a related field that traverses nullable relations. A default is required to have the value in the output, but the current behaviour is to throw an AttributeError.

Closes #5848

@carltongibson carltongibson added this to the 3.8 Release milestone Mar 20, 2018
@carltongibson carltongibson self-assigned this Mar 20, 2018
@carltongibson
Copy link
Collaborator

carltongibson commented Mar 20, 2018

Hi @gcbirzan. This looks very much in line with the other changes we've made thus far here, following from #5375.

I just want to look at the test case a little more closely. Specifically, how it differs from the test case in #5880 and whether we can combine the two.

@carltongibson
Copy link
Collaborator

carltongibson commented Mar 20, 2018

Hi @gcbirzan.

The difference in the tests was just exactly that you're one was using RelatedField whereas the previous one had used an CharField.

I adjusted the test to use the existing models. This looks good to me. Thanks for the input!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants