~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/browser/distroseries.py

Add DistroSeriesInitializeView.rebuilding_allowed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
647
647
        return getFeatureFlag("soyuz.derived_series_ui.enabled") is not None
648
648
 
649
649
    @property
 
650
    def rebuilding_allowed(self):
 
651
        # If the distro has got any initialised series already,
 
652
        # no rebuilding is allowed.
 
653
        return all(
 
654
            [archive.getPublishedSources().is_empty()
 
655
             for archive in self.context.distribution.all_distro_archives])
 
656
 
 
657
    @property
650
658
    def next_url(self):
651
659
        return canonical_url(self.context)
652
660