Fix rule builder input with integer values

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.
This commit is contained in:
mvdbeek
2022-06-17 12:30:55 +02:00
parent c5527edda8
commit a314bcbdbe
+5 -1
View File
@@ -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;