~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/model/distributionsourcepackage.py

  • Committer: Muharem Hrnjadovic
  • Date: 2009-10-22 10:33:00 UTC
  • mto: This revision was merged to the branch mainline in revision 9762.
  • Revision ID: muharem@ubuntu.com-20091022103300-8pfc9tfhflewf8ax
Refactored code:

  - moved distributionsourcepackage.getBugsByNumbers() to bugset.getByNumbers()
  - purged reference to removed template from soyuz/browser/configure.zcml

Show diffs side-by-side

added added

removed removed

Lines of Context:
414
414
                sqlvalues(self.distribution, self.sourcepackagename))
415
415
 
416
416
    @staticmethod
417
 
    def getBugsByNumbers(bug_numbers):
418
 
        """List of `Bug` objects identified by the `bug_numbers` sequence."""
419
 
        if bug_numbers is None or len(bug_numbers) < 1:
420
 
            return EmptyResultSet()
421
 
        store = IStore(Bug)
422
 
        result_set = store.find(Bug, In(Bug.id, bug_numbers))
423
 
        return result_set
424
 
 
425
 
    @staticmethod
426
417
    def getPersonsByEmail(email_addresses):
427
 
        """List of `Person` objects with the given email addresses."""
 
418
        """[(EmailAddress,Person), ..] iterable for given email addresses."""
428
419
        if email_addresses is None or len(email_addresses) < 1:
429
420
            return EmptyResultSet()
430
421
        # Perform basic sanitization of email addresses.