Bugzilla – Attachment 100894 Details for
Bug 22025
Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1018 for /usr/share/koha/bin/import_patrons.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22025: Remove warnings when importing patrons
Bug-22025-Remove-warnings-when-importing-patrons.patch (text/plain), 1.73 KB, created by
Magnus Enger
on 2020-03-17 14:08:22 UTC
(
hide
)
Description:
Bug 22025: Remove warnings when importing patrons
Filename:
MIME Type:
Creator:
Magnus Enger
Created:
2020-03-17 14:08:22 UTC
Size:
1.73 KB
patch
obsolete
>From 6fe347691ceb60507b61e2938f85ddddee697625 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 16 Mar 2020 15:43:49 +0100 >Subject: [PATCH] Bug 22025: Remove warnings when importing patrons > >The following warning is raised when importing patrons >Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1018 > >if one of the following headers is passed but does not have a value: > * privacy > * privacy_guarantor_fines > * privacy_guarantor_checkouts > * anonymized > >Test plan: >- Do not apply the patch >- Generated a csv file with at least one those headers >- Import it using the import_patrons.pl script (or using the GUI) >- Notice the warnings without the patch >- Apply the patch >- Confirm that the warnings do not longer appear > >Signed-off-by: Magnus Enger <magnus@libriotech.no> >Applied the patch on a live server and the warnings went away. >--- > Koha/Patrons/Import.pm | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/Koha/Patrons/Import.pm b/Koha/Patrons/Import.pm >index 91ab8fbc4c..3b3d5865a8 100644 >--- a/Koha/Patrons/Import.pm >+++ b/Koha/Patrons/Import.pm >@@ -222,6 +222,15 @@ sub import_patrons { > delete $borrower{relationship}; > delete $borrower{guarantor_id}; > >+ # Remove warning for int datatype that cannot be null >+ # Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1018 >+ for my $field ( >+ qw( privacy privacy_guarantor_fines privacy_guarantor_checkouts anonymized )) >+ { >+ delete $borrower{$field} >+ if exists $borrower{$field} and $borrower{$field} eq ""; >+ } >+ > if ($borrowernumber) { > > # borrower exists >-- >2.11.0
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 22025
:
100755
|
100756
|
100893
|
100894
|
101106
|
101107