Skip to content

Commit 2c8f50d

Browse files
committed
Don't force translating attribute names.
This attribute key translation was advertised to be "off by default", but was in fact forced in parser. This commit makes it obey JSON_API_FORMAT_KEYS setting.
1 parent cdb8a52 commit 2c8f50d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rest_framework_json_api/parsers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ class JSONParser(parsers.JSONParser):
2929

3030
@staticmethod
3131
def parse_attributes(data):
32-
return utils.format_keys(data.get('attributes'), 'underscore') if data.get('attributes') else dict()
32+
return utils.format_keys(data.get('attributes')) if data.get('attributes') else dict()
3333

3434
@staticmethod
3535
def parse_relationships(data):
36-
relationships = (utils.format_keys(data.get('relationships'), 'underscore')
36+
relationships = (utils.format_keys(data.get('relationships'))
3737
if data.get('relationships') else dict())
3838

3939
# Parse the relationships

0 commit comments

Comments
 (0)