Bug 17499: (follow-up) Fix warning
Fix warning DBIx::Class::Storage::DBI::select_single(): Query returned more than one row. SQL that returns multiple rows is DEPRECATED for ->find and ->single. Sponsored-by: The National Library of Finland Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
a0e5f4e0d9
commit
124f3dadb8
1 changed files with 2 additions and 2 deletions
|
@ -391,10 +391,10 @@ sub _set_message_transport_types {
|
|||
$self->_validate_message_transport_types({ message_transport_types => $types });
|
||||
foreach my $type (@$types) {
|
||||
unless (exists $self->{'_message_transport_types'}->{$type}) {
|
||||
my $transport = Koha::Patron::Message::Transports->find({
|
||||
my $transport = Koha::Patron::Message::Transports->search({
|
||||
message_attribute_id => $self->message_attribute_id,
|
||||
message_transport_type => $type
|
||||
});
|
||||
})->next;
|
||||
unless ($transport) {
|
||||
Koha::Exceptions::Patron::Message::Preference::NoTransportType->throw(
|
||||
error => 'No transport configured for '.$self->message_name.
|
||||
|
|
Loading…
Reference in a new issue