diff options
author | Felix Edel <felix.edel@bmw.de> | 2020-09-29 15:33:13 +0200 |
---|---|---|
committer | Felix Edel <felix.edel@bmw.de> | 2020-10-14 08:20:56 +0200 |
commit | 812ee02594687ab69f21d8724ea643943b1d3de2 (patch) | |
tree | 7dff320eddd8964dc845585fbb971267f51b8f29 /web/src/pages/Buildset.jsx | |
parent | 116b7e9b8eae95ce5aae0194b1fedf60802539e0 (diff) | |
download | zuul-812ee02594687ab69f21d8724ea643943b1d3de2.tar.gz |
Don't overwrite builds when retrieving the buildset
Currently, when retrieving a buildset from the API we also store the
builds that are contained in the buildset's API result in the redux
store. In case those builds were already present (because e.g. the
build page was visited before) they are overwritten but with less
information. This results in missing links and properties on the build
depending on how the page was accessed.
Since the buildset page is anyways using the builds that are contained
in the buildset directly and the build page fetches the necessary build
by itself in case it's not present already, we could simply remove the
relevant part in the fetchBuildset() action and avoid weird behaviour in
the UI.
Change-Id: I90ffd7f8b3fbd13d623ac94ddfd63b5b58cbffe6
Diffstat (limited to 'web/src/pages/Buildset.jsx')
-rw-r--r-- | web/src/pages/Buildset.jsx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/web/src/pages/Buildset.jsx b/web/src/pages/Buildset.jsx index b3a188e25..9069a4315 100644 --- a/web/src/pages/Buildset.jsx +++ b/web/src/pages/Buildset.jsx @@ -25,7 +25,7 @@ import { } from '@patternfly/react-core' import { BuildIcon } from '@patternfly/react-icons' -import { fetchBuildsetIfNeeded } from '../actions/build' +import { fetchBuildset } from '../actions/build' import { EmptyPage } from '../containers/Errors' import { Fetchable, Fetching } from '../containers/Fetching' import BuildList from '../containers/build/BuildList' @@ -39,13 +39,9 @@ class BuildsetPage extends React.Component { dispatch: PropTypes.func, } - updateData = (force) => { + updateData = () => { this.props.dispatch( - fetchBuildsetIfNeeded( - this.props.tenant, - this.props.match.params.buildsetId, - force - ) + fetchBuildset(this.props.tenant, this.props.match.params.buildsetId) ) } |