From: Don Armstrong <don@donarmstrong.com>
Date: Fri, 20 Sep 2013 02:11:20 +0000 (-0700)
Subject: skip duplicate bugs in get_status_and_filter
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=94d029fbbb1f119f2a45f2f86a0c5b0f68801cf3;p=debbugs.git

skip duplicate bugs in get_status_and_filter
---

diff --git a/Debbugs/CGI/Pkgreport.pm b/Debbugs/CGI/Pkgreport.pm
index be345554..294b7386 100644
--- a/Debbugs/CGI/Pkgreport.pm
+++ b/Debbugs/CGI/Pkgreport.pm
@@ -313,6 +313,7 @@ sub get_status_and_filter {
      }
 
     foreach my $bug (@{$param{bugs}}) {
+        next if exists $statuses{$bug};
         my $status = get_bug_status(bug=>$bug,
                                     (exists $param{dist}?(dist => $param{dist}):()),
                                     bugusertags => $param{bugusertags},
diff --git a/cgi/pkgreport.cgi b/cgi/pkgreport.cgi
index d83f93c1..859c8edd 100755
--- a/cgi/pkgreport.cgi
+++ b/cgi/pkgreport.cgi
@@ -424,11 +424,6 @@ determine_ordering(cats => \%cats,
 		   order => \@order,
 		  );
 
-# strip out duplicate bugs
-my %bugs;
-@bugs{@bugs} = @bugs;
-@bugs = keys %bugs;
-
 my $result = pkg_htmlizebugs(bugs => \@bugs,
                              bug_status => $bug_status,
                              names => \@names,