Add BC note for #5886 to 3.8 Release Announcement

This commit is contained in:
Carlton Gibson 2018-03-20 21:05:56 +01:00
parent 0b0c862a8d
commit 63158cd185

View File

@ -33,6 +33,28 @@ If you use REST framework commercially and would like to see this work continue,
*We'd like to say thanks in particular our premium backers, [Rover](http://jobs.rover.com/), [Sentry](https://getsentry.com/welcome/), [Stream](https://getstream.io/?utm_source=drf&utm_medium=banner&utm_campaign=drf), [Machinalis](https://hello.machinalis.co.uk/), and [Rollbar](https://rollbar.com).*
---
## Breaking Changes
### Altered behaviour of `read_only` plus `default` on Field.
[#5886][gh5886]
`read_only` fields will now **always** be excluded from writable fields.
Previously `read_only` fields with a `default` value would use the `default` for create and update operations.
In order to maintain the old behaviour you may need to pass the value of `read_only` fields when calling `save()` in
the view:
def perform_create(self, serializer):
serializer.save(owner=self.request.user)
Alternatively you may override `save()` or `create()` or `update()` on the serialiser as appropriate.
---
## Boolean Composable Permissions
@ -72,3 +94,4 @@ TODO
TODO
[funding]: funding.md
[gh5886]: https://github.com/encode/django-rest-framework/issues/5886