~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Gavin Panella
  • Date: 2012-01-03 15:57:32 UTC
  • mto: This revision was merged to the branch mainline in revision 14638.
  • Revision ID: gavin.panella@canonical.com-20120103155732-hg1s5fbovmy9z7cg
If the bugtask has been provided, use its assigneeID property instead of going to the database; it may be a snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2734
2734
        *Does not* exclude muted subscribers.
2735
2735
        """
2736
2736
        if self.bugtask is None:
2737
 
            assignees = Select(
2738
 
                BugTask.assigneeID, BugTask.bug == self.bug)
 
2737
            assignees = Select(BugTask.assigneeID, BugTask.bug == self.bug)
 
2738
            return load_people(Person.id.is_in(assignees))
2739
2739
        else:
2740
 
            assignees = Select(
2741
 
                BugTask.assigneeID, And(
2742
 
                    BugTask.bug == self.bug,
2743
 
                    BugTask.id == self.bugtask.id))
2744
 
        return load_people(Person.id.is_in(assignees))
 
2740
            return load_people(Person.id == self.bugtask.assigneeID)
2745
2741
 
2746
2742
    @cachedproperty
2747
2743
    @freeze(BugSubscriberSet)