Bugzilla – Attachment 171392 Details for
Bug 37902
Timezone ignored when passing rfc3339 formatted date (search 'q')
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37902: TODOs
Bug-37902-TODOs.patch (text/plain), 2.32 KB, created by
Jonathan Druart
on 2024-09-12 12:56:22 UTC
(
hide
)
Description:
Bug 37902: TODOs
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-09-12 12:56:22 UTC
Size:
2.32 KB
patch
obsolete
>From 4f705636c2c5dd85be9dd664fae6285327627f98 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 12 Sep 2024 12:35:33 +0200 >Subject: [PATCH] Bug 37902: TODOs > >There are still different structures we won't handle properly. >This patch adds conditionals to prevent failures or warnings. > >Should be done, but later. >--- > Koha/Object.pm | 13 ++++++++++++- > Koha/REST/Plugin/Objects.pm | 5 +++-- > 2 files changed, 15 insertions(+), 3 deletions(-) > >diff --git a/Koha/Object.pm b/Koha/Object.pm >index 0f179044ebc..54163dd9b54 100644 >--- a/Koha/Object.pm >+++ b/Koha/Object.pm >@@ -878,13 +878,24 @@ sub attributes_from_api { > my $params; > my $columns_info = $self->_result->result_source->columns_info; > >+ if ( ref($from_api_params) && ref($from_api_params) eq 'ARRAY' ) { >+ # TODO No fixup if an ARRAY is passed >+ return $from_api_params; >+ } >+ > while ( my ( $key, $value ) = each %{$from_api_params} ) { > my $koha_field_name = > exists $from_api_mapping->{$key} > ? $from_api_mapping->{$key} > : $key; > >- $params->{$koha_field_name} = $self->_recursive_fixup( $key, $value, $columns_info->{$koha_field_name} ); >+ if ( exists $columns_info->{$koha_field_name} ) { >+ # TODO No fixup if the name is from an embed (eg. suggester.borrowernumber) >+ # See warnings produced by t/db_dependent/Koha/REST/Plugin/Objects.t if this test is removed >+ $params->{$koha_field_name} = $self->_recursive_fixup( $key, $value, $columns_info->{$koha_field_name} ); >+ } else { >+ $params->{$koha_field_name} = $value; >+ } > } > > return $params; >diff --git a/Koha/REST/Plugin/Objects.pm b/Koha/REST/Plugin/Objects.pm >index 20c8ecca045..d1b921e00c3 100644 >--- a/Koha/REST/Plugin/Objects.pm >+++ b/Koha/REST/Plugin/Objects.pm >@@ -284,8 +284,9 @@ controller, and thus shouldn't be called twice in it. > ); > } > >- $filtered_params = >- $result_set->attributes_from_api($filtered_params); >+ if ( defined $filtered_params ) { >+ $filtered_params = $result_set->attributes_from_api($filtered_params); >+ } > > $c->dbic_validate_operators( { filtered_params => $filtered_params } ); > >-- >2.34.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 37902
:
171389
|
171390
|
171391
|
171392
|
171402
|
171403
|
171515
|
171551
|
171652
|
171762
|
171763
|
171764
|
171765
|
171766
|
171767
|
171768
|
172105
|
172106
|
172107
|
172108
|
172109
|
172110
|
172111
|
172112