Bugzilla – Attachment 130725 Details for
Bug 30074
Missing extended_attributes relationship in DBIC schema
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30074: Add missing extended_attributes rs in DBIC schema
Bug-30074-Add-missing-extendedattributes-rs-in-DBI.patch (text/plain), 1.90 KB, created by
Martin Renvoize (ashimema)
on 2022-02-17 12:15:25 UTC
(
hide
)
Description:
Bug 30074: Add missing extended_attributes rs in DBIC schema
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-02-17 12:15:25 UTC
Size:
1.90 KB
patch
obsolete
>From a1284361aeb94e9fd9e6bf123881db43cd12a656 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 10 Feb 2022 15:28:11 +0100 >Subject: [PATCH] Bug 30074: Add missing extended_attributes rs in DBIC schema > >REST API route /patrons has extended_attributes available (x-koha-embed) but it's actually not working. > >GET /api/v1/patrons: unhandled exception (Koha::Exceptions::BadParameter)<<Cannot find Koha::Object class for extended_attributes>> Koha::REST::Plugin::Exceptions::__ANON__ /kohadevbo >x/koha/Koha/REST/Plugin/Exceptions.pm (73) > >It's missing the relationship named "extended_attributes". > >Test plan: >Create a new patron attribute CODE and a value for a patron > >Hit /api/v1/patrons?q={"extended_attributes.type":"CODE"} > >Also: >1. Apply the regression tests patch >2. Run: > $ kshell > k$ prove t/db_dependent/api/v1/patrons.t >=> FAIL: Tests fail, boooo >3. Apply this patch >4. Repeat 2 >=> SUCCESS: Tests pass! >5. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Schema/Result/Borrower.pm | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm >index d4c13f1f3d..20ea7e30fb 100644 >--- a/Koha/Schema/Result/Borrower.pm >+++ b/Koha/Schema/Result/Borrower.pm >@@ -1908,6 +1908,13 @@ __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber"); > # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-09-20 12:00:15 > # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9g9WsdsdPINi2NP4H2A+CA > >+__PACKAGE__->has_many( >+ "extended_attributes", >+ "Koha::Schema::Result::BorrowerAttribute", >+ { "foreign.borrowernumber" => "self.borrowernumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > __PACKAGE__->add_columns( > '+anonymized' => { is_boolean => 1 }, > '+lost' => { is_boolean => 1 }, >-- >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 30074
:
130448
|
130667
|
130668
|
130724
| 130725