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

--- Comment #21 from Paul Derscheid <[email protected]> ---
Created attachment 202320
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202320&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]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to