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)
git-svn-id: svn://10.0.0.236/trunk@251684 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user