Skip to content

Commit

Permalink
Fix application error invalidation
Browse files Browse the repository at this point in the history
Assume that the supplied filed values as well as the whole config is
valid on app form change.

Closes mesosphere/marathon#3494
  • Loading branch information
Orlando Hohmeier committed Mar 21, 2016
1 parent 1d82083 commit 1268fe9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/js/components/AppConfigEditFormComponent.jsx
Expand Up @@ -114,8 +114,10 @@ var AppConfigEditFormComponent = React.createClass({
onFormChange: function (fieldId) {
var responseErrorMessages = this.state.responseErrorMessages;

if (responseErrorMessages != null &&
responseErrorMessages[fieldId] != null) {
// At present we assume that the supplied filed value as well as the general
// config is valid.
if (responseErrorMessages != null ) {
delete responseErrorMessages["general"];
delete responseErrorMessages[fieldId];
}

Expand Down
1 change: 1 addition & 0 deletions src/js/components/modals/AppModalComponent.jsx
Expand Up @@ -92,6 +92,7 @@ var AppModalComponent = React.createClass({
});
} else {
this.setState({
appIsValid: false,
error: AppFormStore.responseErrors
});
}
Expand Down

0 comments on commit 1268fe9

Please sign in to comment.