[Koha-bugs] [Bug 32353] items.item_group_id should be undefined in tests by default

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Nov 25 14:08:29 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32353

--- Comment #6 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
+    } elsif( !exists $value->{$col_name}
+           && exists $self->{default_values}{$source}{$col_name} ) {
+        my $v = $self->{default_values}{$source}{$col_name};
+        $v = &$v() if ref($v) eq 'CODE';
+        push @$retvalue, $v;
     } elsif( $col_info->{is_foreign_key} || _should_be_fk($source,$col_name) )
{
         if( exists $value->{$col_name} ) {
             if( !defined $value->{$col_name} && !$col_info->{is_nullable} ) {
@@ -427,10 +432,6 @@ sub _buildColumnValue {
             return;
         }
         push @$retvalue, $value->{$col_name};
-    } elsif( exists $self->{default_values}{$source}{$col_name} ) {
-        my $v = $self->{default_values}{$source}{$col_name};
-        $v = &$v() if ref($v) eq 'CODE';
-        push @$retvalue, $v;

Sure about this change? This has been working for years?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list