Skip to content

Commit 817ec9f

Browse files
committed
Dont allow empty values for subset
1 parent 445f6aa commit 817ec9f

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

SequenceAnalysis/resources/web/SequenceAnalysis/field/TrimmingTextArea.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ Ext4.define('SequenceAnalysis.field.TrimmingTextArea', {
1919
this.callParent();
2020
},
2121

22+
getErrors: function(value){
23+
var errors = this.callParent(arguments);
24+
25+
if (!this.allowBlank && this.getSubmitValue() == null) {
26+
errors = errors.concat('Must enter a value');
27+
}
28+
29+
return errors;
30+
},
31+
2232
setValue: function(val){
2333
if (Ext4.isString(val)) {
2434
val = val.split(this.delimiter);

singlecell/src/org/labkey/singlecell/pipeline/singlecell/SubsetSeurat.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ protected List<String> loadChunkFromFile() throws PipelineJobException
6161
{
6262
ToolParameterDescriptor pd = getProvider().getParameterByName("expression");
6363
final String val = StringUtils.trimToNull(pd.extractValue(getPipelineCtx().getJob(), getProvider(), getStepIdx()));
64+
if (val == null)
65+
{
66+
throw new PipelineJobException("A blank subset was provided. This should have been caught upstream");
67+
}
68+
6469
final String[] values = val.split(",");
6570

6671
List<String> ret = new ArrayList<>();

0 commit comments

Comments
 (0)