diff --git a/tailbone/views/batch.py b/tailbone/views/batch.py index 2e6b8529..3b7faa1c 100644 --- a/tailbone/views/batch.py +++ b/tailbone/views/batch.py @@ -265,6 +265,20 @@ class BatchMasterView(MasterView): # return this object to replace the original return batch + def get_batch_kwargs(self, batch): + """ + Return a kwargs dict for use with ``self.handler.make_batch()``, using + the given batch as a template. + """ + kwargs = {} + if batch.created_by: + kwargs['created_by'] = batch.created_by + elif batch.created_by_uuid: + kwargs['created_by_uuid'] = batch.created_by_uuid + if hasattr(batch, 'filename'): + kwargs['filename'] = batch.filename + return kwargs + def init_batch(self, batch): """ Initialize a new batch. Derived classes can override this to @@ -925,20 +939,6 @@ class FileBatchMasterView(BatchMasterView): fs.filename, ]) - def get_batch_kwargs(self, batch): - """ - Return a kwargs dict for use with ``self.handler.make_batch()``, using - the given batch as a template. - """ - kwargs = {} - if batch.created_by: - kwargs['created_by'] = batch.created_by - elif batch.created_by_uuid: - kwargs['created_by_uuid'] = batch.created_by_uuid - if hasattr(batch, 'filename'): - kwargs['filename'] = batch.filename - return kwargs - def download(self): """ View for downloading the data file associated with a batch.