Skip to content

Commit e1e876f

Browse files
committed
Fix moving inactive ontology (fix #320)
1 parent 8c5b3e3 commit e1e876f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/ubc/pavlab/rdp/services/OntologyService.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -436,14 +436,14 @@ public int deactivateTermSubtree( OntologyTermInfo ontologyTermInfo ) {
436436
@Secured("ROLE_ADMIN")
437437
@Transactional
438438
public void move( Ontology ontology, Direction direction ) {
439-
List<Ontology> ontologies = ontologyRepository.findAllByActiveTrue();
439+
List<Ontology> ontologies = ontologyRepository.findAll();
440440
ontologies.sort( Ontology.getComparator() );
441441

442442
// compute the original position
443443
int i = ontologies.indexOf( ontology );
444444

445445
if ( i == -1 ) {
446-
throw new IllegalArgumentException( "The provided ontology is not active." );
446+
throw new IllegalArgumentException( String.format( "Unknown ontology %s.", ontology.getName() ) );
447447
}
448448

449449
// compute the target position

0 commit comments

Comments
 (0)