]> git.koha-community.org Git - koha.git/commit
Bug 16517: Do not crash when creating a list with an existing name
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 13 May 2016 19:21:12 +0000 (20:21 +0100)
committerJulian Maurice <julian.maurice@biblibre.com>
Wed, 25 May 2016 08:57:25 +0000 (10:57 +0200)
commitb260550a7af6c5efa33e86b8ea35f7847ee4e582
treeca6d665dd17579029670801309bd91d8ea9126b6
parentb8f9f4150a589a2e703505474200be99bf22784f
Bug 16517: Do not crash when creating a list with an existing name

A typo has been made during a merge conflict when rebasing bug 16517.

it should be
  eval { Koha::Object->new->store; };
instead of
  eval { Koha::Object->new; }->store;

Test plan:
From the result list (intranet side), check some entries and add them to
a new list
Use an existing list's name
=> Without this patch you will get a server error (exception 'Duplicate shelf
object' raised by Koha::Virtualshelf->new->store)
=> With this patch you must get a friendly error message

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7dfc64022b8be63a10cb4c3f802d45a0b0f99973)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
virtualshelves/addbybiblionumber.pl