Bugzilla – Attachment 96660 Details for
Bug 23893
Add ->new_from_api and ->set_from_api methods to Koha::Object
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23893: No special care for booleans
Bug-23893-No-special-care-for-booleans.patch (text/plain), 1.58 KB, created by
Tomás Cohen Arazi (tcohen)
on 2019-12-27 15:22:17 UTC
(
hide
)
Description:
Bug 23893: No special care for booleans
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2019-12-27 15:22:17 UTC
Size:
1.58 KB
patch
obsolete
>From 4560f8d9c3a4c0319a8833fd592e9caff393ac5c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 27 Dec 2019 15:21:27 +0100 >Subject: [PATCH] Bug 23893: No special care for booleans > >Tests pass without that changes. If we need them they should be at >Koha::Object anyway. > >About the date, I also think that that should be moved to Koha::Object >(we can guess it, like we do in Koha::Object->store, retrieve the >datatype and adjust). Also we can send a DT object to DBIC, no need for >an sql formatted date > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Patron.pm | 12 ++---------- > 1 file changed, 2 insertions(+), 10 deletions(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index b6e854edf2..4038ddf94e 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -1571,20 +1571,12 @@ sub attributes_from_api { > > $attrs = $self->SUPER::attributes_from_api( $attrs ); > >- if ( exists $attrs->{lost} ) { >- $attrs->{lost} = ($attrs->{lost}) ? 1 : 0; >- } >- >- if ( exists $attrs->{ gonenoaddress} ) { >- $attrs->{gonenoaddress} = ($attrs->{gonenoaddress}) ? 1 : 0; >- } >- > if ( exists $attrs->{lastseen} ) { >- $attrs->{lastseen} = output_pref({ str => $attrs->{lastseen}, dateformat => 'sql' }); >+ $attrs->{lastseen} = dt_from_string($attrs->{lastseen}); > } > > if ( exists $attrs->{updated_on} ) { >- $attrs->{updated_on} = output_pref({ str => $attrs->{updated_on}, dateformat => 'sql' }); >+ $attrs->{updated_on} = dt_from_string($attrs->{updated_on}); > } > > return $attrs; >-- >2.24.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 23893
:
95276
|
95277
|
95278
|
95311
|
95312
|
95313
|
95314
|
95315
|
96126
|
96127
|
96128
|
96129
|
96130
|
96652
|
96655
|
96656
|
96657
|
96658
|
96659
|
96660
|
96661
|
96662
|
96665
|
96666
|
96920
|
96921
|
96922
|
96923
|
96924
|
96925
|
96926
|
96927
|
96928
|
96929
|
96930
|
96931
|
96932
|
96933
|
96934
|
96935
|
96936
|
96937
|
97391