Fixed theme warnings not passed when installing theme

refs 6593c3e4a6

In development mode, we didn't pass the warnings when installing a theme. So the warnings were not visible with the fatal errors.
This commit is contained in:
Simon Backx 2023-01-06 15:26:54 +01:00
parent f6e463ea43
commit 3ddc85781c
3 changed files with 4 additions and 2 deletions

View File

@ -124,7 +124,7 @@ export default class InstallThemeModal extends Component {
this.fatalValidationErrors = fatalErrors; this.fatalValidationErrors = fatalErrors;
this.validationErrors = normalErrors; this.validationErrors = normalErrors;
this.validationWarnings = error.payload.errors[0].details.warnings || [];
return false; return false;
} }

View File

@ -153,6 +153,7 @@ export default class UploadThemeModal extends Component {
this.fatalValidationErrors = fatalErrors; this.fatalValidationErrors = fatalErrors;
this.validationErrors = normalErrors; this.validationErrors = normalErrors;
this.validationWarnings = errorResponse.payload.errors[0].details.warnings || [];
} }
} }

View File

@ -143,7 +143,8 @@ const getThemeValidationError = (message, themeName, checkedTheme) => {
message: tpl(messages[message], {theme: themeName}), message: tpl(messages[message], {theme: themeName}),
errorDetails: Object.assign( errorDetails: Object.assign(
_.pick(checkedTheme, ['checkedVersion', 'name', 'path', 'version']), { _.pick(checkedTheme, ['checkedVersion', 'name', 'path', 'version']), {
errors: checkedTheme.results.error errors: checkedTheme.results.error,
warnings: checkedTheme.results.warning
} }
) )
}); });