my $self = shift;
if (!defined $self->{'flag_types'}) {
+ my $flagtypes = Bugzilla::FlagType::match({ product_id => $self->product_id,
+ component_id => $self->id });
+
$self->{'flag_types'} = {};
$self->{'flag_types'}->{'bug'} =
- Bugzilla::FlagType::match({ 'target_type' => 'bug',
- 'product_id' => $self->product_id,
- 'component_id' => $self->id });
-
+ [grep { $_->target_type eq 'bug' } @$flagtypes];
$self->{'flag_types'}->{'attachment'} =
- Bugzilla::FlagType::match({ 'target_type' => 'attachment',
- 'product_id' => $self->product_id,
- 'component_id' => $self->id });
+ [grep { $_->target_type eq 'attachment' } @$flagtypes];
}
return $self->{'flag_types'};
}