~launchpad-results/launchpad-results/trunk

« back to all changes in this revision

Viewing changes to lib/lpresults/registry/models/distribution.py

  • Committer: Marc Tardif
  • Date: 2011-09-14 01:25:40 UTC
  • Revision ID: marc.tardif@canonical.com-20110914012540-1gs255vhv6kb0mg4
Added updating of submissions periodically.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
    def __parent__(self):
66
66
        return getUtility(IServiceRootResource)
67
67
 
68
 
    def create(self, name, series_name):
 
68
    def create(self, name, series_name, series_version):
69
69
        """See `IDistributionSet`."""
70
70
        distribution = Distribution(name)
71
71
 
76
76
        store.flush()
77
77
 
78
78
        # Create a default series and set it as the current series
79
 
        series = distribution.newSeries(series_name)
 
79
        series = distribution.newSeries(series_name, series_version)
80
80
        distribution.current_series = series
81
81
 
82
82
        notify(ObjectCreatedEvent(distribution))