Bugzilla – Attachment 119443 Details for
Bug 27857
Koha::Patron->extended_attributes skips checks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27857: Fix Pseudonymization.t
Bug-27857-Fix-Pseudonymizationt.patch (text/plain), 1.73 KB, created by
Jonathan Druart
on 2021-04-12 09:11:25 UTC
(
hide
)
Description:
Bug 27857: Fix Pseudonymization.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-04-12 09:11:25 UTC
Size:
1.73 KB
patch
obsolete
>From f736068f745caddc79c07625cb66f4eac148f4a8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 12 Apr 2021 11:08:01 +0200 >Subject: [PATCH] Bug 27857: Fix Pseudonymization.t > >t/db_dependent/Koha/Pseudonymization.t .. 2/3 > # Failed test 'Attribute 1 should be retrieved correctly' > # at t/db_dependent/Koha/Pseudonymization.t line 198. > # Structures begin differing at: > # $got->{borrowernumber} = Does not exist > # $expected->{borrowernumber} = '58' > > # Failed test 'Attribute 2 should be retrieved correctly' > # at t/db_dependent/Koha/Pseudonymization.t line 204. > # Structures begin differing at: > # $got->{borrowernumber} = Does not exist > # $expected->{borrowernumber} = '58' > # Looks like you failed 2 tests of 3. >t/db_dependent/Koha/Pseudonymization.t .. 3/3 > >Highlighted by > commit 7b40ee22035210e3fbdfe75785d68ca314285409 > Bug 27857: Make Koha::Patron->extended_attributes validate data > >Koha::Patron->add_extended_attributes should not modify the $attribute >hashref parameter we passed. >--- > Koha/Patron.pm | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 7630ce72a56..a5385337264 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -1539,8 +1539,14 @@ sub generate_userid { > > sub add_extended_attribute { > my ($self, $attribute) = @_; >- $attribute->{borrowernumber} = $self->borrowernumber; >- return Koha::Patron::Attribute->new($attribute)->store; >+ >+ return Koha::Patron::Attribute->new( >+ { >+ %$attribute, >+ ( borrowernumber => $self->borrowernumber ), >+ } >+ )->store; >+ > } > > =head3 extended_attributes >-- >2.20.1
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 27857
:
117709
|
117710
|
117711
|
117938
|
117945
|
117946
|
117947
|
117948
|
117953
|
117954
|
117955
|
117956
|
117957
|
119009
|
119038
|
119040
| 119443 |
119937
|
119938