From 819e09b848e4f1cc45165a99ffbef1307b215a08 Mon Sep 17 00:00:00 2001 From: Daniel Pyrathon Date: Mon, 10 Mar 2014 15:17:57 +0000 Subject: Fixed #22210 -- Saving model instances to non-related fields. Previously, saving a model instance to a non-related field (in particular a FloatField) would silently convert the model to an Integer (the pk) and save it. This is undesirable behaviour, and likely to cause confusion so the validatio has been hardened. Thanks to @PirosB3 for the patch and @jarshwah for the review. --- docs/releases/1.7.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs') diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt index 52007c98aa..2dd3931060 100644 --- a/docs/releases/1.7.txt +++ b/docs/releases/1.7.txt @@ -674,6 +674,10 @@ Models the new :attr:`ManyToManyField.through_fields ` argument. +* Assigning a model instance to a non-relation field will now throw an error. + Previously this used to work if the field accepted integers as input as it + took the primary key. + Signals ^^^^^^^ -- cgit v1.3