def lock_delete(self):
if self.products.exists():
return _("Cannot delete family model, relationship between family model and products")
elif self.features.exists():
return _("Cannot delete family model, relationship between family model and features")
elif self.attributes.exists():
return _("Cannot delete family model, relationship between family model and attributes")
elif self.feature_specials.exists():
return _("Cannot delete family model, relationship between family model and feature special")
elif self.categories.exists():
return _("Cannot delete family model, relationship between family model and categories")
else:
return super(Family, self).lock_delete()
# categorias
评论列表
文章目录