From fb8fab1577c5bb0808f304c9629f91969ce1d832 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 3 Jul 2015 17:48:53 -0500 Subject: [PATCH] Tweak logic for removing certain form fields when creating a batch. Just to be a little more on the safe side. --- tailbone/views/batch.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tailbone/views/batch.py b/tailbone/views/batch.py index 4ff29838..91264cb5 100644 --- a/tailbone/views/batch.py +++ b/tailbone/views/batch.py @@ -631,8 +631,10 @@ class FileBatchCrud(BatchCrud): fs.filename.set(renderer=FileFieldRenderer.new(self), label="Data File") self.configure_fieldset(fs) if self.creating: - del fs.created - del fs.created_by + if 'created' in fs.render_fields: + del fs.created + if 'created_by' in fs.render_fields: + del fs.created_by if 'cognized' in fs.render_fields: del fs.cognized if 'cognized_by' in fs.render_fields: