def resolve_can_delete(self: Grupo, info): return validate_can_delete(self.usuario_set.count())
def resolve_can_delete(self: FuncionPersonal, info): return validate_can_delete(self.personal_set.count())
def resolve_can_delete(self: Persona, info): return validate_can_delete( self.personal_set.count()) and validate_can_delete( self.alumno.count())
def resolve_can_delete(self: Discapacidad, info): return validate_can_delete(self.persona_set.count())
def resolve_can_delete(self: Alumno, info): return validate_can_delete(self.alumnoaula_set.count())
def resolve_can_delete(self: Personal, info): return validate_can_delete(self.aula_set.count()) \ and validate_can_delete(self.coordinador.count()) \ and validate_can_delete(self.sub_coordinador.count()) \ and validate_can_delete(self.director.count())
def resolve_can_delete(self: AlumnoAula, info): return validate_can_delete(self.alumno_aula.count()) \ and self.aula.periodo.estado == PeriodoLectivo.EstadosPeriodo.ABIERTO.value
def resolve_can_delete(self: PeriodoLectivo, info): return validate_can_delete(self.aula_set.count())