diff options
author | lpsolit%gmail.com <> | 2008-05-17 20:59:07 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2008-05-17 20:59:07 +0200 |
commit | a60171ca78b4b601b72274f2132816ea247ca55d (patch) | |
tree | f7216859d8555fd3955fc7ce763865301af9563f /Bugzilla | |
parent | 2ee97093788e64e307f738ba439ea4b52d7bc15f (diff) | |
download | bugzilla-a60171ca78b4b601b72274f2132816ea247ca55d.tar.gz bugzilla-a60171ca78b4b601b72274f2132816ea247ca55d.tar.xz |
Bug 434062: Attachment flags can only be set once per bug (regression) - Patch by Frédéric Buclin <LpSolit@gmail.com> a=LpSolit (module owner)
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Flag.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm index a65a8268b..6266b0c0c 100644 --- a/Bugzilla/Flag.pm +++ b/Bugzilla/Flag.pm @@ -228,12 +228,12 @@ sub match { # If the caller specified only bug or attachment flags, # limit the query to those kinds of flags. if (my $type = delete $criteria->{'target_type'}) { - if ($type eq 'attachment') { - $criteria->{'attach_id'} = NOT_NULL; - } - else { + if ($type eq 'bug') { $criteria->{'attach_id'} = IS_NULL; } + elsif (!defined $criteria->{'attach_id'}) { + $criteria->{'attach_id'} = NOT_NULL; + } } # Flag->snapshot() calls Flag->match() with bug_id and attach_id # as hash keys, even if attach_id is undefined. |