Bug 22033: Remove related_resultset from the list of available methods
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 20 Dec 2018 21:55:34 +0000 (18:55 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 3 Jan 2019 14:17:07 +0000 (14:17 +0000)
It is not covered by tests.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ccbed38e213de6a6b9331fc34d2f872bf5ab5fc7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Koha/Object.pm

index e62af3e..2dc135e 100644 (file)
@@ -321,7 +321,7 @@ sub unblessed_all_relateds {
 
     my %data;
     my $related_resultsets = $self->_result->{related_resultsets} || {};
-    my $rs = $self;
+    my $rs = $self->_result;
     while ( $related_resultsets and %$related_resultsets ) {
         my @relations = keys %{ $related_resultsets };
         if ( @relations ) {
@@ -404,7 +404,7 @@ sub AUTOLOAD {
         }
     }
 
-    my @known_methods = qw( is_changed id in_storage get_column discard_changes update related_resultset make_column_dirty );
+    my @known_methods = qw( is_changed id in_storage get_column discard_changes update make_column_dirty );
 
     Koha::Exceptions::Object::MethodNotCoveredByTests->throw(
         error      => sprintf("The method %s->%s is not covered by tests!", ref($self), $method),