Bug 16517: Do not crash when creating a list with an existing name
[koha.git] / virtualshelves / addbybiblionumber.pl
index 790904f..71270b7 100755 (executable)
@@ -132,8 +132,8 @@ sub HandleNewVirtualShelf {
                 sortfield => $sortfield,
                 owner => $loggedinuser,
             }
-        );
-    }->store;
+        )->store;
+    };
     if ( $@ or not $shelf ) {
         $authorized = 0;
         $errcode    = 1;