http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14256
--- Comment #12 from Jonathan Druart <[email protected]> --- Comment on attachment 39789 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39789 Bug 14256: (followup) do not repeat existing values on primary columns Review of attachment 39789: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=14256&attachment=39789) ----------------------------------------------------------------- ::: t/lib/TestBuilder.pm @@ +244,5 @@ > + my $data_type = $col_info->{data_type}; > + $data_type =~ s| |_|; > + > + if ( any { $data_type eq $_ } (keys $gen_type) ) { > + my $value_ok = 'no'; A boolean would be enough. @@ +249,5 @@ > + while ( $value_ok eq 'no' ) { > + # generate value > + $col_value = $gen_type->{$data_type}->( $self, { info => > $col_info } ); > + # should value be unique? > + my $primary_names = > $self->schema->source($source)->primary_columns(); What about unique keys? @@ +250,5 @@ > + # generate value > + $col_value = $gen_type->{$data_type}->( $self, { info => > $col_info } ); > + # should value be unique? > + my $primary_names = > $self->schema->source($source)->primary_columns(); > + if ( not ( any { $col_name eq $_ } $primary_names and any takes a list in parameter, not a ref. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
