Code review comment for lp:~edwin-grubbs/launchpad/bug-682727-bug-count-timeout

Revision history for this message
Graham Binns (gmb) wrote :

Hi Edwin,

Couple of minor nitpicks here, but otherwise this is r=me.

60 + def get_counts(self, user):
61 + counts = self.bugtask_set.getStatusCountsForProductSeries(
62 + user, self.series)
63 + return [(BugTaskStatus.items[status_id], count)
64 + for status_id, count in counts]

The indentation for these statements is a bit weird. I think that it
should look like this:

    counts = self.bugtask_set.getStatusCountsForProductSeries(
        user, self.series)
    return [
        (BugTaskStatus.items[status_id], count)
        for status_id, count in counts]

186 + [bugtask] = bug.bugtasks

I know that the context makes it unlikely that we'll have > 1 bugtask on
the bug at this point, but for safety's (and readability's) sake I'd
prefer this to be:

    bugtask = bug.default_bugtask

review: Approve (code)

« Back to merge proposal