diff options
author | Dylan Hardison <dylan@mozilla.com> | 2016-02-26 14:56:16 +0100 |
---|---|---|
committer | Dylan Hardison <dylan@mozilla.com> | 2016-02-26 14:56:16 +0100 |
commit | c664718ef5e857144479859546d998f1465b830b (patch) | |
tree | 07032cef4ae6a00e068d43cfd5933168b5566f68 /Bugzilla/Component.pm | |
parent | 981cd0404a2a3a0a8a320c1709151b18075a3655 (diff) | |
download | bugzilla-c664718ef5e857144479859546d998f1465b830b.tar.gz bugzilla-c664718ef5e857144479859546d998f1465b830b.tar.xz |
Bug 1251221 - Pass cache => 1 to calls to Bugzilla::Product->new() called in Bugzilla::{Milestone,Version,Component}
r=dkl,a=dylan
Diffstat (limited to 'Bugzilla/Component.pm')
-rw-r--r-- | Bugzilla/Component.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Bugzilla/Component.pm b/Bugzilla/Component.pm index 9bc0a4493..3e50dab80 100644 --- a/Bugzilla/Component.pm +++ b/Bugzilla/Component.pm @@ -390,10 +390,9 @@ sub initial_cc { sub product { my $self = shift; - if (!defined $self->{'product'}) { - require Bugzilla::Product; # We cannot |use| it. - $self->{'product'} = new Bugzilla::Product($self->product_id); - } + + require Bugzilla::Product; + $self->{'product'} ||= Bugzilla::Product->new({ id => $self->product_id, cache => 1 }); return $self->{'product'}; } |