Add basic support for "eligible purchases" for receiving batch API

This commit is contained in:
Lance Edgar 2019-11-12 17:46:18 -06:00
parent 3514c4050e
commit a9b740dcaa
3 changed files with 64 additions and 9 deletions

View file

@ -117,9 +117,12 @@ class APIBatchView(APIBatchMixin, APIMasterView):
Here we'll invoke the handler for actual batch creation, instead of
typical logic used for simple records.
"""
user = self.request.user
kwargs = dict(data)
kwargs['user'] = self.request.user
kwargs['user'] = user
batch = self.handler.make_batch(self.Session(), **kwargs)
if self.handler.should_populate(batch):
self.handler.do_populate(batch, user)
return batch
def update_object(self, batch, data):