Skip to content

Commit 92bc99e

Browse files
committed
Bug 880669 - Extend current BzAPI BMO extension to contain compatibility changes on top of native rest
1 parent b8f1c74 commit 92bc99e

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

extensions/BzAPI/lib/Util.pm

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ sub fix_bug {
120120
# Attachment metadata is included by default but not data
121121
if (filter_wants_nocache($params, 'attachments')) {
122122
my $attachment_params = { ids => $data->{id} };
123-
if (!filter_wants_nocache($params, 'data', 'attachments')
123+
if (!filter_wants_nocache($params, 'attachments.data')
124124
&& !$params->{attachmentdata})
125125
{
126126
$attachment_params->{exclude_fields} = ['data'];
@@ -356,8 +356,7 @@ sub fix_attachment {
356356
if (exists $data->{flags} && @{ $data->{flags} }) {
357357
my @new_flags;
358358
foreach my $flag (@{ $data->{flags} }) {
359-
$flag = fix_flag($flag);
360-
push(@new_flags, filter($params, $flag, 'flags'));
359+
push(@new_flags, fix_flag($flag));
361360
}
362361
$data->{flags} = \@new_flags;
363362
}
@@ -523,9 +522,7 @@ sub fix_include_exclude {
523522
sub filter_wants_nocache {
524523
my ($params, $field, $prefix, $use_original) = @_;
525524

526-
my $cache = Bugzilla->request_cache->{filter_wants};
527-
my $cached_field = $prefix ? "${prefix}.${field}" : $field;
528-
delete $cache->{$cached_field} if $cache;
525+
delete Bugzilla->request_cache->{filter_wants};
529526

530527
if ($use_original) {
531528
my $cache = Bugzilla->request_cache;

0 commit comments

Comments
 (0)