GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Well I tried a similar thing on Django 1.6 and it worked.... So I have tried to do a similar thing.
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/related.py:414:24: E711 comparison to None should be 'if cond is None:'
./django/db/models/fields/related.py:415:81: E225 missing whitespace around operator
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.
I think ticket #9982 is also related.
Fixed #10811 -- Error raised when assigning unsaved model to Foreign Key
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.