Fixed double-listing of tree bugs when target is None
authorAaron Bentley <abentley@panoramicfeedback.com>
Mon, 21 Mar 2005 13:37:03 +0000 (13:37 +0000)
committerAaron Bentley <abentley@panoramicfeedback.com>
Mon, 21 Mar 2005 13:37:03 +0000 (13:37 +0000)
becommands/list.py

index d92ebaced132cc3fea82e95f48a597046bb1220b..94ca10a7780cc0417e45a03625300f899981316b 100644 (file)
@@ -24,15 +24,16 @@ def execute(args):
     my_bugs = []
     other_bugs = []
     unassigned_bugs = []
-    for bug in bugs:
-        if tree.target is not None and bug.target != tree.target:
-            continue
-        if bug.assigned == current_id:
-            my_target_bugs.append(bug)
-        elif bug.assigned is None:
-            unassigned_target_bugs.append(bug)
-        else:
-            other_target_bugs.append(bug)
+    if tree.target is not None:
+        for bug in bugs:
+            if bug.target != tree.target:
+                continue
+            if bug.assigned == current_id:
+                my_target_bugs.append(bug)
+            elif bug.assigned is None:
+                unassigned_target_bugs.append(bug)
+            else:
+                other_target_bugs.append(bug)
 
     for bug in bugs:
         if tree.target is not None and bug.target == tree.target: