We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a951c6 commit cdc8b61Copy full SHA for cdc8b61
rest_framework_json_api/utils.py
@@ -227,7 +227,7 @@ def extract_attributes(fields, resource):
227
228
# Skip read_only attribute fields when the resource is non-existent
229
# Needed for the "Raw data" form of the browseable API
230
- if resource.get('id') is None and fields[field_name].read_only:
+ if len(data) == 0 and fields[field_name].read_only:
231
continue
232
233
data.update({
0 commit comments