@@ -, +, @@ classes $ kshell k$ prove t/db_dependent/Template/Plugin/Categories.t --- Koha/Objects.pm | 3 ++- t/db_dependent/Template/Plugin/Categories.t | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) --- a/Koha/Objects.pm +++ a/Koha/Objects.pm @@ -196,7 +196,8 @@ sub delete { =head3 update - $object->update( $fields, [ { no_triggers => 0/1 } ] ); + my $objects = Koha::Objects->new; # or Koha::Objects->search + $objects->update( $fields, [ { no_triggers => 0/1 } ] ); This method overloads the DBIC inherited one so if code-level triggers exist (through the use of an overloaded I or I method in the Koha::Object --- a/t/db_dependent/Template/Plugin/Categories.t +++ a/t/db_dependent/Template/Plugin/Categories.t @@ -65,7 +65,7 @@ subtest 'can_any_reset_password() tests' => sub { $schema->storage->txn_begin; # Make sure all existing categories have reset_password set to 0 - Koha::Patron::Categories->update({ reset_password => 0 }); + Koha::Patron::Categories->search->update({ reset_password => 0 }); ok( !Koha::Template::Plugin::Categories->new->can_any_reset_password, 'No category is allowed to reset password' ); --