Skip to content

Commit

Permalink
Hopefully fixing empty obs string issue
Browse files Browse the repository at this point in the history
  • Loading branch information
souley committed Nov 26, 2020
1 parent 6e9f815 commit 1b3c237
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 5 additions & 3 deletions app/components/ProductList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ class PipelineConfigurator extends React.Component {
config: {},
error: '',
validSubForm: true,
observation: ""
};
this.updateDerived = this.updateDerived.bind(this);
this.submit = this.submit.bind(this);
Expand Down Expand Up @@ -253,7 +254,7 @@ class PipelineConfigurator extends React.Component {
const email = this.props.email
const description = this.props.description
const submitEndpoint = '/sessions'
let observation
//let observation
fetch('/product/' + this.props.lid, {
headers: {
'content-type': 'application/json'
Expand All @@ -263,7 +264,8 @@ class PipelineConfigurator extends React.Component {
else
throw 'Server returned ' + response.statusText})
.then(srmuris => {
observation = srmuris.products.map((d) => d.URI).join('|');
this.setState({ observation: srmuris.products.map((d) => d.URI).join('|') });
//observation = srmuris.products.map((d) => d.URI).join('|');
})
fetch('/product/' + this.props.lid2, {
headers: {
Expand All @@ -274,7 +276,7 @@ class PipelineConfigurator extends React.Component {
else
throw 'Server returned ' + response.statusText})
.then(srmuris => {
const body = {pipeline, email, description, config: this.state.config, observation, observation2: srmuris.products.map((d) => d.URI).join('|')};
const body = {pipeline, email, description, config: this.state.config, observation: this.state.observation, observation2: srmuris.products.map((d) => d.URI).join('|')};
return fetch(submitEndpoint, {
body: JSON.stringify(body),
method: 'POST', // *GET, POST, PUT, DELETE, etc.
Expand Down
8 changes: 4 additions & 4 deletions www/app.bundle.js

Large diffs are not rendered by default.

0 comments on commit 1b3c237

Please sign in to comment.