Bugzilla – Attachment 174599 Details for
Bug 38136
Refactor database translations (alternative)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38136: Die early if the localization relationship does not exist
Bug-38136-Die-early-if-the-localization-relationsh.patch (text/plain), 1.06 KB, created by
Julian Maurice
on 2024-11-15 15:30:01 UTC
(
hide
)
Description:
Bug 38136: Die early if the localization relationship does not exist
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2024-11-15 15:30:01 UTC
Size:
1.06 KB
patch
obsolete
>From 405b577b5b7b3e82c20e0708f67f727c256814e0 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Fri, 15 Nov 2024 16:25:19 +0100 >Subject: [PATCH] Bug 38136: Die early if the localization relationship does > not exist > >confess shows the whole stacktrace which is useful to spot where we made >a mistake (croak showed the wrong file) >--- > Koha/Schema/Component/Localization.pm | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/Koha/Schema/Component/Localization.pm b/Koha/Schema/Component/Localization.pm >index bd93f893b1..9c485efa2a 100644 >--- a/Koha/Schema/Component/Localization.pm >+++ b/Koha/Schema/Component/Localization.pm >@@ -94,6 +94,7 @@ queries > =cut > > use Modern::Perl; >+use Carp; > > use base qw(DBIx::Class); > >@@ -101,6 +102,9 @@ sub localization_add_relationships { > my ($class, $rel_name, $fk_column, $pk_column, @properties) = @_; > > my $rel_info = $class->relationship_info($rel_name); >+ unless ($rel_info) { >+ confess "Unknown relation '$rel_name'"; >+ } > > $class->has_many( > 'localizations', >-- >2.39.2
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 38136
:
172585
|
172804
|
173195
|
173196
|
173197
|
173198
|
174578
|
174579
|
174580
|
174581
|
174598
|
174599
|
175077
|
175078
|
175082
|
175083
|
179978
|
180096
|
180136