[Rt-commit] rt branch 5.0/rest2-skip-link-searches created. rt-5.0.5-147-gb1a2dfbbf9
BPS Git Server
git at git.bestpractical.com
Thu Jan 25 14:46:36 UTC 2024
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".
The branch, 5.0/rest2-skip-link-searches has been created
at b1a2dfbbf964e80bce1b7d38532c134903146dab (commit)
- Log -----------------------------------------------------------------
commit b1a2dfbbf964e80bce1b7d38532c134903146dab
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Jan 25 09:31:53 2024 -0500
No need to search links if the record does not support links
Previously for ticket's history requests with "_hyperlinks" fields
enabled, it issued a bunch of link searches on transactions in vain, since
transactions don't actually support links.
diff --git a/lib/RT/REST2/Resource/Record/Hypermedia.pm b/lib/RT/REST2/Resource/Record/Hypermedia.pm
index c2127a3508..5136009587 100644
--- a/lib/RT/REST2/Resource/Record/Hypermedia.pm
+++ b/lib/RT/REST2/Resource/Record/Hypermedia.pm
@@ -100,6 +100,7 @@ sub _rtlink_links {
my $record = $self->record;
my @links;
+ return unless $record->DOES('RT::Record::Role::Links');
for my $relation (keys %link_refs) {
my $ref = $link_refs{$relation};
my $mode = $RT::Link::TYPEMAP{$relation}{Mode};
-----------------------------------------------------------------------
hooks/post-receive
--
rt
More information about the rt-commit
mailing list