Unverified Commit a314bcbd authored by mvdbeek's avatar mvdbeek
Browse files

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.
parent c5527edd
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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;