@property
    def deletable(self):
        return not Environment.objects.filter(elements__category=self).exists()


    # @@@ this protection should apply to queryset.delete as well
Return True if this category can be deleted, otherwise False.
dataset/ETHPy150Open mozilla/moztrap/moztrap/model/environments/models.py/Category.deletable