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()
|
app = self.get_rattail_app()
|
||||||
key = self.get_batch_class().batch_key
|
key = self.get_batch_class().batch_key
|
||||||
spec = self.rattail_config.get('rattail.batch', '{}.handler'.format(key),
|
return app.get_batch_handler(key, default=self.default_handler_spec)
|
||||||
default=self.default_handler_spec)
|
|
||||||
return app.load_object(spec)(self.rattail_config)
|
|
||||||
|
|
||||||
|
|
||||||
class APIBatchView(APIBatchMixin, APIMasterView):
|
class APIBatchView(APIBatchMixin, APIMasterView):
|
||||||
|
|
Loading…
Reference in a new issue