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 f5ea1de commit 7051841Copy full SHA for 7051841
rest_framework_json_api/utils.py
@@ -35,10 +35,8 @@ def get_resource_name(context):
35
if code.startswith('4') or code.startswith('5'):
36
return 'errors'
37
38
- try:
39
- # Check the view
40
- resource_name = getattr(view, 'resource_name')
41
- except AttributeError:
+ resource_name = getattr(view, 'resource_name')
+ if not resource_name:
42
try:
43
# Check the meta class
44
resource_name = (
0 commit comments