projects
/
koha.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Bug 14544: Handle database error when creating a shelf with DB admin account
[koha.git]
/
Koha
/
Virtualshelf.pm
diff --git
a/Koha/Virtualshelf.pm
b/Koha/Virtualshelf.pm
index
d80f249
..
7ce2738
100644
(file)
--- a/
Koha/Virtualshelf.pm
+++ b/
Koha/Virtualshelf.pm
@@
-51,6
+51,10
@@
our $PUBLIC = 2;
sub store {
my ( $self ) = @_;
+ unless ( $self->owner ) {
+ Koha::Exceptions::Virtualshelves::UseDbAdminAccount->throw;
+ }
+
unless ( $self->is_shelfname_valid ) {
Koha::Exceptions::Virtualshelves::DuplicateObject->throw;
}