Bugzilla – Attachment 146516 Details for
Bug 32353
reserves.item_group_id should be undefined in tests by default
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32353: Pick the default value for FK
Bug-32353-Pick-the-default-value-for-FK.patch (text/plain), 1.54 KB, created by
Kyle M Hall (khall)
on 2023-02-10 19:38:44 UTC
(
hide
)
Description:
Bug 32353: Pick the default value for FK
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-02-10 19:38:44 UTC
Size:
1.54 KB
patch
obsolete
>From 6819a4180b8257f0ed745acd155492e1e8af8e5c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 25 Nov 2022 13:17:46 +0100 >Subject: [PATCH] Bug 32353: Pick the default value for FK > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > t/lib/TestBuilder.pm | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > >diff --git a/t/lib/TestBuilder.pm b/t/lib/TestBuilder.pm >index 95699392c6..015d7bbd9a 100644 >--- a/t/lib/TestBuilder.pm >+++ b/t/lib/TestBuilder.pm >@@ -403,6 +403,11 @@ sub _buildColumnValue { > return; > } > # otherwise: no need to assign a value >+ } 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} ) { >@@ -426,10 +431,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; > } else { > my $data_type = $col_info->{data_type}; > $data_type =~ s| |_|; >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 32353
:
144253
|
144254
|
144255
|
144279
|
144957
|
144958
| 146516 |
146517
|
147191