From c85ec4c0ec8d9a35f8483847f31b9b91bbbbd632 Mon Sep 17 00:00:00 2001
From: Jesse Weaver <jweaver@bywatersolutions.com>
Date: Thu, 21 Jul 2016 13:34:26 -0600
Subject: [PATCH] Bug 15774: (QA follow-up) Make sure that tablename is
 correctly saved
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
---
 admin/additional-fields.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/admin/additional-fields.pl b/admin/additional-fields.pl
index be85381f98..0fc8b5f09a 100755
--- a/admin/additional-fields.pl
+++ b/admin/additional-fields.pl
@@ -107,7 +107,7 @@ if ( $op eq 'add_form' ) {
         $field = Koha::AdditionalField->new( { id => $field_id } )->fetch;
     }
 
-    $tablename = $field->{tablename};
+    $tablename = $field->{tablename} if $field;
 
     $template->param(
         field => $field,
-- 
2.11.0