Skip to content

Commit

Permalink
Fix rule builder input with integer values
Browse files Browse the repository at this point in the history
Upload a dataset with the only content being
`123`. Go to the upload module, select the `Rule-based` tab.
Select `Load tabular data from: `History Dataset` and select
the dataset you just uploaded. Without this fix you'd see
```
vue.runtime.esm.js?2b0e:1897 TypeError: selection.content.split is not a function
    at createCollectionViaRules (RuleBasedCollectionCreatorModal.js?46f9:63:1)
    at child.buildCollection (history-view-edit.js?0c85:387:1)
    at VueComponent._buildSelection (RulesInput.vue?5e16:199:1)
    at VueComponent._eventBuild (RulesInput.vue?5e16:164:1)
    at invokeWithErrorHandling (vue.runtime.esm.js?2b0e:1863:1)
    at HTMLButtonElement.invoker (vue.runtime.esm.js?2b0e:2184:1)
    at original._wrapper (vue.runtime.esm.js?2b0e:6961:1)
```
That because `selection.content` is an integer value.
  • Loading branch information
mvdbeek committed Jun 17, 2022
1 parent c5527ed commit a314bcb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/src/components/Upload/RulesInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,11 @@ export default {
.get(
`${getAppRoot()}api/histories/${
Galaxy.currHistoryPanel.model.id
}/contents/${selectedDatasetId}/display`
}/contents/${selectedDatasetId}/display`,
// The Rule builder expects strings, we should not parse the respone to the default JSON type
{
responseType: "text",
}
)
.then((response) => {
this.sourceContent = response.data;
Expand Down

0 comments on commit a314bcb

Please sign in to comment.