Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
I don't think this is useful, it will be a mess if we have to check this
case everywhere. But it works!
I let the cut to the QAer or RM.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
'Koha::Exceptions::Virtualshelves::ShareHasExpired' => {
isa => 'Koha::Exceptions::Exception',
description=> 'Cannot share this shelf, the share has expired',
+ },
+ 'Koha::Exceptions::Virtualshelves::UseDbAdminAccount' => {
+ isa => 'Koha::Exceptions::Exception',
+ description => "Invalid use of database administrator account",
}
);
sub store {
my ( $self ) = @_;
+ unless ( $self->owner ) {
+ Koha::Exceptions::Virtualshelves::UseDbAdminAccount->throw;
+ }
+
unless ( $self->is_shelfname_valid ) {
Koha::Exceptions::Virtualshelves::DuplicateObject->throw;
}
No biblio has been removed.
[% CASE 'Koha::Exceptions::Virtualshelves::DuplicateObject' %]
An error occurred when inserting this list. The name already [% shelfname %] exists.
+ [% CASE 'Koha::Exceptions::Virtualshelves::UseDbAdminAccount' %]
+ List could not be created. (Do not use the database administrator account.).
[% CASE 'DBIx::Class::Exception' %]
[% m.msg %]
[% CASE %]