Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)

src/m/o/moztrap-HEAD/moztrap/model/environments/models.py   moztrap(Download)
    def deletable(self):
        """Return True if this environment can be deleted, otherwise False."""
        from moztrap.model import ProductVersion
        return not ProductVersion.objects.filter(environments=self).exists()
 
    def delete(self, *args, **kwargs):
        """Delete this environment, or raise ProtectedError if its in use."""
        if not self.deletable:
            from moztrap.model import ProductVersion
            raise models.ProtectedError(