Skip to content

Commit 52c26f8

Browse files
committed
Bugfix FASTQC validation
1 parent 0e30fc4 commit 52c26f8

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/SequenceAnalysisController.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
import org.labkey.api.util.ExceptionUtil;
119119
import org.labkey.api.util.FileType;
120120
import org.labkey.api.util.FileUtil;
121+
import org.labkey.api.util.HtmlString;
121122
import org.labkey.api.util.NetworkDrive;
122123
import org.labkey.api.util.PageFlowUtil;
123124
import org.labkey.api.util.Pair;
@@ -218,14 +219,17 @@ public SequenceAnalysisController()
218219
public class FastqcReportAction extends SimpleViewAction<FastqcForm>
219220
{
220221
@Override
221-
public ModelAndView getView(FastqcForm form, BindException errors) throws Exception
222+
public void validate(FastqcForm form, BindException errors)
222223
{
223-
if (form.getFilenames() == null && form.getDataIds() == null)
224+
if (form.getReadsets() == null && form.getFilenames() == null && form.getDataIds() == null && form.getAnalysisIds() == null)
224225
{
225226
errors.reject(ERROR_MSG, "Must provide a filename or Exp data Ids");
226-
return null;
227227
}
228+
}
228229

230+
@Override
231+
public ModelAndView getView(FastqcForm form, BindException errors) throws Exception
232+
{
229233
//resolve files
230234
List<File> files = new ArrayList<>();
231235
Map<File, String> labels = new HashMap<>();
@@ -315,7 +319,7 @@ public ModelAndView getView(FastqcForm form, BindException errors) throws Except
315319
try
316320
{
317321
String html = runner.execute(files, labels);
318-
return new HtmlView("FastQC Report", html);
322+
return new HtmlView("FastQC Report", HtmlString.unsafe(html));
319323
}
320324
catch (FileNotFoundException e)
321325
{

0 commit comments

Comments
 (0)