diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt
index 2516807..5ebaafb 100644
|
a
|
b
|
Now, an error will be raised to prevent data loss::
|
| 710 | 710 | ... |
| 711 | 711 | ValueError: Cannot assign "<Author: John>": "Author" instance isn't saved in the database. |
| 712 | 712 | |
| | 713 | Accessing foreign keys in ``ModelForm.save()`` |
| | 714 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| | 715 | |
| | 716 | In older versions, you could access foreign keys in ``ModelForm.save()`` when |
| | 717 | adding new instances. For example, given ``Book`` with a ``ForeignKey`` to |
| | 718 | ``Author``:: |
| | 719 | |
| | 720 | class BookForm(forms.ModelForm): |
| | 721 | def save(self, *args, **kwargs): |
| | 722 | book = super(BookForm, self).save(*args, **kwargs) |
| | 723 | book.title = "%s by %s" % (book.title, book.author.name) |
| | 724 | return book |
| | 725 | |
| | 726 | This is no longer possible because accessing the foreign key (``book.author`` |
| | 727 | in the example) will raise ``RelatedObjectDoesNotExist``. This change was |
| | 728 | necessary to avoid assigning unsaved objects to relations (as described in the |
| | 729 | previous section). |
| | 730 | |
| | 731 | To adapt the above example, you could replace ``book.author.name`` with |
| | 732 | ``self.cleaned_data['author'].name``. |
| | 733 | |
| 713 | 734 | Management commands that only accept positional arguments |
| 714 | 735 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 715 | 736 | |