@@ -, +, @@ branchcode --- Koha/Exceptions/Hold.pm | 4 ++++ Koha/Hold.pm | 2 ++ 2 files changed, 6 insertions(+) --- a/Koha/Exceptions/Hold.pm +++ a/Koha/Exceptions/Hold.pm @@ -31,6 +31,10 @@ use Exception::Class ( 'Koha::Exceptions::Hold::InvalidPickupLocation' => { isa => 'Koha::Exceptions::Hold', description => 'The supplied pickup location is not valid' + }, + 'Koha::Exceptions::Hold::MissingPickupLocation' => { + isa => 'Koha::Exceptions::Hold', + description => 'You must supply a pickup location when placing a hold' } ); --- a/Koha/Hold.pm +++ a/Koha/Hold.pm @@ -713,6 +713,8 @@ expirationdate for holds. sub store { my ($self) = @_; + Koha::Exceptions::Hold::MissingPickupLocation->throw() unless $self->branchcode; + if ( !$self->in_storage ) { if ( ! $self->expirationdate && $self->patron_expiration_date ) { $self->expirationdate($self->patron_expiration_date); --