View | Details | Raw Unified | Return to bug 25423
Collapse All | Expand All

(-)a/Koha/Objects.pm (-4 / +10 lines)
Lines 24-29 use List::MoreUtils qw( none ); Link Here
24
use Class::Inspector;
24
use Class::Inspector;
25
25
26
use Koha::Database;
26
use Koha::Database;
27
use Koha::Exceptions::Object;
27
28
28
=head1 NAME
29
=head1 NAME
29
30
Lines 225-230 catch wrong uses as well. Link Here
225
sub update {
226
sub update {
226
    my ($self, $fields, $options) = @_;
227
    my ($self, $fields, $options) = @_;
227
228
229
    Koha::Exceptions::Object::NotInstantiated->throw(
230
        method => 'update',
231
        class  => $self
232
    ) unless ref $self;
233
228
    my $no_triggers = $options->{no_triggers};
234
    my $no_triggers = $options->{no_triggers};
229
235
230
    if (
236
    if (
Lines 325-333 an iterator). Link Here
325
sub empty {
331
sub empty {
326
    my ($self) = @_;
332
    my ($self) = @_;
327
333
328
    unless (ref($self)) {
334
    Koha::Exceptions::Object::NotInstantiated->throw(
329
        $self = $self->new;
335
        method => 'empty',
330
    }
336
        class  => $self
337
    ) unless ref $self;
331
338
332
    $self->_resultset()->set_cache([]);
339
    $self->_resultset()->set_cache([]);
333
340
334
- 

Return to bug 25423