Commit 8925a08
committed
fix a bug of Dispatcher.add_class when using as decorator
Below is the code to reveal this bug:
@dispatcher.add_class
class ProcessOrderAPI(APISet):
rpc_exports = ['query', 'detail', 'start', 'update']
rpc_method_prefix = 'ProcessOrder'
Model = ProcessOrder
def update(self, object, attrs):
# NOTE HERE: Since add_class retuns None previously,
# So the 1st argument of super() is None
return super(ProcessOrderAPI, self).update(object, attrs)1 parent 4425243 commit 8925a08
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| |||
0 commit comments