Skip to content

Commit

Permalink
Add BC note for #5886 to 3.8 Release Announcement
Browse files Browse the repository at this point in the history
  • Loading branch information
carltongibson committed Mar 20, 2018
1 parent 9b4d5fe commit af7bf31
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/topics/3.8-announcement.md
Expand Up @@ -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
Expand Down Expand Up @@ -72,3 +94,4 @@ TODO
TODO

[funding]: funding.md
[gh5886]: https://github.com/encode/django-rest-framework/issues/5886

0 comments on commit af7bf31

Please sign in to comment.