未验证 提交 d320c7ef 编写于 作者: B Boris Sekachev 提交者: GitHub

Fixed: Incorrect text on the warning when specifying an incorrect link to the...

Fixed: Incorrect text on the warning when specifying an incorrect link to the issue tracker. (#2971)

* Fixed issue #2967

* Updated version & changelog
上级 dacdf37b
......@@ -67,6 +67,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed project search field updating (<https://github.com/openvinotoolkit/cvat/pull/2901>)
- Fixed export error when invalid polygons are present in overlapping frames (<https://github.com/openvinotoolkit/cvat/pull/2852>)
- Fixed image quality option for tasks created from images (<https://github.com/openvinotoolkit/cvat/pull/2963>)
- Incorrect text on the warning when specifying an incorrect link to the issue tracker (<https://github.com/openvinotoolkit/cvat/pull/2971>)
- Updating label attributes when label contains number attributes (<https://github.com/openvinotoolkit/cvat/pull/2969>)
### Security
......
{
"name": "cvat-ui",
"version": "1.15.4",
"version": "1.15.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
{
"name": "cvat-ui",
"version": "1.15.4",
"version": "1.15.5",
"description": "CVAT single-page application",
"main": "src/index.tsx",
"scripts": {
......
......@@ -11,6 +11,8 @@ import Button from 'antd/lib/button';
import Collapse from 'antd/lib/collapse';
import notification from 'antd/lib/notification';
import Text from 'antd/lib/typography/Text';
// eslint-disable-next-line import/no-extraneous-dependencies
import { ValidateErrorEntity } from 'rc-field-form/lib/interface';
import ConnectedFileManager from 'containers/file-manager/file-manager';
import LabelsEditor from 'components/labels-editor/labels-editor';
......@@ -183,19 +185,20 @@ class CreateTaskContent extends React.PureComponent<Props & RouteComponentProps,
if (this.advancedConfigurationComponent.current) {
return this.advancedConfigurationComponent.current.submit();
}
return new Promise<void>((resolve): void => {
resolve();
});
return Promise.resolve();
})
.then((): void => {
const { onCreate } = this.props;
onCreate(this.state);
})
.catch((error: Error): void => {
.catch((error: Error | ValidateErrorEntity): void => {
notification.error({
message: 'Could not create a task',
description: error.toString(),
description: (error as ValidateErrorEntity).errorFields ?
(error as ValidateErrorEntity).errorFields
.map((field) => `${field.name} : ${field.errors.join(';')}`)
.map((text: string): JSX.Element => <div>{text}</div>) :
error.toString(),
className: 'cvat-notification-create-task-fail',
});
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册