fix for JAL-1298
authorJim Procter <jprocter@compbio.dundee.ac.uk>
Sun, 9 Jun 2013 14:29:43 +0000 (15:29 +0100)
committerJim Procter <jprocter@compbio.dundee.ac.uk>
Sun, 9 Jun 2013 14:30:07 +0000 (15:30 +0100)
src/jalview/ws/rest/RestJob.java

index 2392e76..c89f241 100644 (file)
@@ -106,11 +106,11 @@ public class RestJob extends AWsJob
         }
         else
         {
-          // TODO: move validation of input data to SeqGroupIndexVector
-          if ((prm.getValue() instanceof SeqGroupIndexVector)
-                  && (_input.getGroups() != null && _input.getGroups()
-                          .size() >= prm.getValue().min))
+          if (prm.getValue() instanceof SeqGroupIndexVector
+                  && _input.getGroups() != null
+                  && _input.getGroups().size() >= -1 + prm.getValue().min)
           {
+            // the test above is not rigorous but fixes JAL-1298, since submission will fail if the partition set doesn't contain at least one partition
             alinp.add(prm.getValue());
           }
           else