Review: Needs Fixing code

122     + allowed_bug_policies = set(
123     + BUG_POLICY_ALLOWED_TYPES.get(product.bug_sharing_policy, []))
124     + allowed_branch_policies = set(
125     + BRANCH_POLICY_ALLOWED_TYPES.get(
126     + product.branch_sharing_policy, []))

You'll need to either exclude those with *_sharing_policy unset, or default to 
FREE_INFORMATION_TYPES, otherwise all legacy-configured projects will have 
their builtin APs reaped.

127     + access_polices = set(

Does it really?

131     + apas = getUtility(IAccessPolicyArtifactSource).findByPolicy(
132     + candidate_aps)
133     + used_aps = set([apa.policy for apa in apas])

This is going to load potentially hundreds of thousands of objects, which is 
probably not what you want.
-- 
https://code.launchpad.net/~stevenk/launchpad/remove-unused-sharing-garbo/+merge/120698
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to