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

(-)a/t/lib/TestBuilder.pm (-5 / +5 lines)
Lines 403-408 sub _buildColumnValue { Link Here
403
            return;
403
            return;
404
        }
404
        }
405
        # otherwise: no need to assign a value
405
        # otherwise: no need to assign a value
406
    } elsif( !exists $value->{$col_name}
407
           && exists $self->{default_values}{$source}{$col_name} ) {
408
        my $v = $self->{default_values}{$source}{$col_name};
409
        $v = &$v() if ref($v) eq 'CODE';
410
        push @$retvalue, $v;
406
    } elsif( $col_info->{is_foreign_key} || _should_be_fk($source,$col_name) ) {
411
    } elsif( $col_info->{is_foreign_key} || _should_be_fk($source,$col_name) ) {
407
        if( exists $value->{$col_name} ) {
412
        if( exists $value->{$col_name} ) {
408
            if( !defined $value->{$col_name} && !$col_info->{is_nullable} ) {
413
            if( !defined $value->{$col_name} && !$col_info->{is_nullable} ) {
Lines 426-435 sub _buildColumnValue { Link Here
426
            return;
431
            return;
427
        }
432
        }
428
        push @$retvalue, $value->{$col_name};
433
        push @$retvalue, $value->{$col_name};
429
    } elsif( exists $self->{default_values}{$source}{$col_name} ) {
430
        my $v = $self->{default_values}{$source}{$col_name};
431
        $v = &$v() if ref($v) eq 'CODE';
432
        push @$retvalue, $v;
433
    } else {
434
    } else {
434
        my $data_type = $col_info->{data_type};
435
        my $data_type = $col_info->{data_type};
435
        $data_type =~ s| |_|;
436
        $data_type =~ s| |_|;
436
- 

Return to bug 32353