~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/browser/bug.py

Merge db-devel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
    LaunchpadView,
67
67
    Link,
68
68
    Navigation,
69
 
    redirection,
70
69
    StandardLaunchpadFacets,
71
70
    stepthrough,
72
71
    structured,
146
145
        if name.isdigit():
147
146
            attachment = getUtility(IBugAttachmentSet)[name]
148
147
            if attachment is not None and attachment.bug == self.context:
149
 
                return redirection(canonical_url(attachment), status=301)
 
148
                return self.redirectSubTree(
 
149
                    canonical_url(attachment), status=301)
150
150
 
151
151
    @stepthrough('+attachment')
152
152
    def traverse_attachment(self, name):
438
438
            #      If fixed_bugtasks isn't sliced, it will take a long time
439
439
            #      to iterate over it, even over just 10, because
440
440
            #      Transaction.iterSelect() listifies the result.
441
 
            for bugtask in fixed_bugtasks[:4*limit]:
 
441
            for bugtask in fixed_bugtasks[:4 * limit]:
442
442
                if bugtask.bug not in fixed_bugs:
443
443
                    fixed_bugs.append(bugtask.bug)
444
444
                    if len(fixed_bugs) >= limit: