Fixed #10811 -- Error raised when assigning unsaved model to Foreign Key #2162

wants to merge 1 commit into


None yet
2 participants

coder9042 commented Jan 11, 2014

Well I tried a similar thing on Django 1.6 and it worked.... So I have tried to do a similar thing.


timgraham commented Jan 13, 2014

As noted in iRC, there are 11 test failures with this patch. A test for the new error would also be required.

Also, please check your code with flake8 before submitting a PR; here are the errors:
./django/db/models/fields/ E711 comparison to None should be 'if cond is None:'
./django/db/models/fields/ E225 missing whitespace around operator


coder9042 commented Jan 16, 2014

I have tried to fix as many errors in testcases as possible but I am unable to fix some of them as I am unable to understand what the code is doing there.
Need help here..
Regarding test for this ticket I have edited a testcase so that it automatically becomes testcase for this one.
Please review.


coder9042 commented Jan 24, 2014

I think ticket #9982 is also related.


timgraham commented Feb 7, 2014

I'm going to close this PR for now since we can't merge it as-is and there doesn't seem to much interest in fixing it given the difficulty.

@timgraham timgraham closed this Feb 7, 2014

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