Commit Graph

11 Commits

Author SHA1 Message Date
Anubhav Joshi 5643a3b51b Fixed #10811 -- Made assigning unsaved objects to FK, O2O, and GFK raise ValueError.
This prevents silent data loss.

Thanks Aymeric Augustin for the initial patch and Loic Bistuer for the review.
2014-06-05 13:12:01 -04:00
Aymeric Augustin cff59bedc2 Split ignores_nulls_in_unique_constraints feature.
Oracle and SQL Server don't have exactly the same limitations. It's
worth treating them differently.
2014-05-08 22:11:20 +02:00
Michael Manfre 1dbbdb29a0 Fixed #21746 - Fixed test_get_reverse_on_unsaved_object test.
Test will no longer attempt to insert multiple NULL rows in to a unique
field if the database doesn't support it.
2014-01-08 10:52:13 -05:00
Simon Charette fa2e1371cd Fixed #21216 -- Allow `OneToOneField` reverse accessor to be hidden. 2013-10-03 13:20:05 -04:00
Aymeric Augustin ee0ef1b094 Partial revert of 165f44aa.
That commit didn't always improve readability.

See discussion on django-developers for details.
2013-09-22 14:04:10 +02:00
Anssi Kääriäinen b53ed351b3 Fixed #14043 -- Made sure nullable o2o delete works as expected
There was an old complaint about nullable one-to-one field cascading
even when the o2o field was saved to None value before the deletion.
Added an test to verify this doesn't happen.

Also some PEP 8 cleanup.
2013-08-20 09:50:37 +03:00
Claude Paroz 165f44aaaa Combine consecutive with statements
Python 2.7 allows to combine several 'with' instructions.
2013-08-16 20:12:10 +02:00
Alasdair Nicol 22c6497f99 Fixed #20895 -- Made check management command warn if a BooleanField does not have a default value
Thanks to Collin Anderson for the suggestion and Tim Graham for
reviewing the patch.
2013-08-15 19:47:26 -04:00
Claude Paroz 5c1143910e Removed most of absolute_import imports
Should be unneeded with Python 2.7 and up.
Added some unicode_literals along the way.
2013-07-29 20:28:13 +02:00
Aymeric Augustin bc35b95274 Fixed test failures introduced in e16c48e001. 2013-03-24 15:27:50 +01:00
Florian Apolloner 89f40e3624 Merged regressiontests and modeltests into the test root. 2013-02-26 14:36:57 +01:00