File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ def api_view(http_method_names=None):
18
18
Decorator that converts a function-based view into an APIView subclass.
19
19
Takes a list of allowed methods for the view as an argument.
20
20
"""
21
- http_method_names = ['GET' ] if http_method_names is None else http_method_names
21
+ http_method_names = ['GET' ] if ( http_method_names is None ) else http_method_names
22
22
23
23
def decorator (func ):
24
24
@@ -112,7 +112,7 @@ def detail_route(methods=None, **kwargs):
112
112
"""
113
113
Used to mark a method on a ViewSet that should be routed for detail requests.
114
114
"""
115
- methods = ['get' ] if methods is None else methods
115
+ methods = ['get' ] if ( methods is None ) else methods
116
116
117
117
def decorator (func ):
118
118
func .bind_to_methods = methods
@@ -126,7 +126,7 @@ def list_route(methods=None, **kwargs):
126
126
"""
127
127
Used to mark a method on a ViewSet that should be routed for list requests.
128
128
"""
129
- methods = ['get' ] if methods is None else methods
129
+ methods = ['get' ] if ( methods is None ) else methods
130
130
131
131
def decorator (func ):
132
132
func .bind_to_methods = methods
You can’t perform that action at this time.
0 commit comments