Ejemplo n.º 1
0
 def validate(self) -> None:
     # Validate/populate model exists
     self._model = AnnotationLayerDAO.find_by_id(self._model_id)
     if not self._model:
         raise AnnotationLayerNotFoundError()
     if AnnotationLayerDAO.has_annotations(self._model.id):
         raise AnnotationLayerDeleteIntegrityError()
Ejemplo n.º 2
0
 def validate(self) -> None:
     # Validate/populate model exists
     self._models = AnnotationLayerDAO.find_by_ids(self._model_ids)
     if not self._models or len(self._models) != len(self._model_ids):
         raise AnnotationLayerNotFoundError()
     if AnnotationLayerDAO.has_annotations(self._model_ids):
         raise AnnotationLayerBulkDeleteIntegrityError()