Bug 19214: prevent crash if club_template_field is called in list context
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 7 Sep 2017 17:15:20 +0000 (14:15 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 7 Sep 2017 17:15:59 +0000 (14:15 -0300)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Club/Field.pm

index 6f92d83..56f5aa0 100644 (file)
@@ -46,7 +46,7 @@ Represents the value set at creation time for a Koha::Club::Template::Field
 sub club_template_field {
     my ( $self ) = @_;
 
-    return Koha::Club::Template::Fields->find( $self->club_template_field_id );
+    return scalar Koha::Club::Template::Fields->find( $self->club_template_field_id );
 }
 
 =head3 type