https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41917

--- Comment #15 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 193834
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193834&action=edit
Bug 41917: (QA follow-up) Avoid extra SELECT in get_effective_rule fallback

The parent itemtype fallback in get_effective_rule called
$itemtype_obj->parent, which uses the DBIx::Class belongs_to
relationship accessor and issues a second SELECT to load the full
parent row. Only the parent's itemtype code is needed for the
subsequent search, so replace it with $itemtype_obj->parent_type
which goes through Koha::Object's AUTOLOAD and reads the already-
fetched column value directly with no extra query.

Signed-off-by: Martin Renvoize <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to