~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Gavin Panella
  • Date: 2012-01-04 17:46:45 UTC
  • mto: This revision was merged to the branch mainline in revision 14638.
  • Revision ID: gavin.panella@canonical.com-20120104174645-w5dw4az8973y1upt
Fix lint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
479
479
    def getSubscriptions(self, subscriber=None):
480
480
        """See `IStructuralSubscriptionTarget`."""
481
481
        from lp.registry.model.person import Person
482
 
        clauses = [StructuralSubscription.subscriberID==Person.id]
 
482
        clauses = [StructuralSubscription.subscriberID == Person.id]
483
483
        for key, value in self._target_args.iteritems():
484
484
            clauses.append(
485
 
                getattr(StructuralSubscription, key)==value)
 
485
                getattr(StructuralSubscription, key) == value)
486
486
 
487
487
        if subscriber is not None:
488
488
            clauses.append(
489
 
                StructuralSubscription.subscriberID==subscriber.id)
 
489
                StructuralSubscription.subscriberID == subscriber.id)
490
490
 
491
491
        store = Store.of(self.__helper.pillar)
492
492
        return store.find(
882
882
            group_by=(BugSubscriptionFilter.id,),
883
883
            having=Count(
884
884
                SQL('CASE WHEN BugSubscriptionFilterTag.include '
885
 
                    'THEN BugSubscriptionFilterTag.tag END'))==0)
 
885
                    'THEN BugSubscriptionFilterTag.tag END')) == 0)
886
886
    else:
887
887
        # The bug has some tags.  This will require a bit of fancy
888
888
        # footwork. First, though, we will simply want to leave out