launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #03918
[Merge] lp:~bryce/launchpad/components-null-check into lp:launchpad
Bryce Harrington has proposed merging lp:~bryce/launchpad/components-null-check into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~bryce/launchpad/components-null-check/+merge/64280
Check for undefined component_group_name before trying to use it.
--
https://code.launchpad.net/~bryce/launchpad/components-null-check/+merge/64280
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~bryce/launchpad/components-null-check into lp:launchpad.
=== modified file 'lib/lp/bugs/model/bugtracker.py'
--- lib/lp/bugs/model/bugtracker.py 2011-06-03 00:46:14 +0000
+++ lib/lp/bugs/model/bugtracker.py 2011-06-11 06:31:10 +0000
@@ -687,7 +687,9 @@
"""See `IBugTracker`."""
component_group = None
store = IStore(BugTrackerComponentGroup)
- if component_group_name.isdigit():
+ if component_group_name is None:
+ return None
+ elif component_group_name.isdigit():
component_group_id = int(component_group_name)
component_group = store.find(
BugTrackerComponentGroup,
Follow ups