Use shared logic to get batch handler
This commit is contained in:
parent
b231c194a4
commit
b13fc99e95
|
@ -66,9 +66,7 @@ class APIBatchMixin(object):
|
|||
"""
|
||||
app = self.get_rattail_app()
|
||||
key = self.get_batch_class().batch_key
|
||||
spec = self.rattail_config.get('rattail.batch', '{}.handler'.format(key),
|
||||
default=self.default_handler_spec)
|
||||
return app.load_object(spec)(self.rattail_config)
|
||||
return app.get_batch_handler(key, default=self.default_handler_spec)
|
||||
|
||||
|
||||
class APIBatchView(APIBatchMixin, APIMasterView):
|
||||
|
|
Loading…
Reference in a new issue