Exemple #1
0
 def decorate(spr_ids):
     # Find the SPPHs for each SPR in our result.
     load(SourcePackageRelease, spr_ids)
     sprs = [SourcePackageRelease.get(spr_id) for spr_id in spr_ids]
     pubs = DistributionSourcePackageRelease.getPublishingHistories(
         self.distribution, sprs)
     sprs_by_id = dict((spr, list(pubs))
                       for (spr, pubs) in itertools.groupby(
                           pubs, attrgetter('sourcepackagereleaseID')))
     return [(DistributionSourcePackageRelease(
         distribution=self.distribution,
         sourcepackagerelease=spr), sprs_by_id[spr.id]) for spr in sprs]
 def sourcepackagerelease(self):
     return SourcePackageRelease.get(self.sourcepackagerelease_id)