From 9d1b2f2cf1f9fbbd08b963a2ed43e43ea948af57 Mon Sep 17 00:00:00 2001 From: Zhiltsov Max Date: Tue, 8 Sep 2020 11:34:31 +0300 Subject: [PATCH] Fix PDF reading --- CHANGELOG.md | 1 + cvat/apps/engine/task.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 844cc02fe6f5..b9cf816bac08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed multiple errors which arises when polygon is of length 5 or less () +- Fixed task creation from PDF () ### Security - diff --git a/cvat/apps/engine/task.py b/cvat/apps/engine/task.py index 1056e2f3bc6d..e89877295088 100644 --- a/cvat/apps/engine/task.py +++ b/cvat/apps/engine/task.py @@ -311,7 +311,7 @@ def update_progress(progress): counter_ = itertools.count() if isinstance(extractor, MEDIA_TYPES['archive']['extractor']): media_files = [os.path.relpath(path, upload_dir) for path in extractor._source_path] - elif isinstance(extractor, MEDIA_TYPES['zip']['extractor']): + elif isinstance(extractor, (MEDIA_TYPES['zip']['extractor'], MEDIA_TYPES['pdf']['extractor'])): media_files = extractor._source_path numbers_sequence = range(db_data.start_frame, min(data['stop_frame'] if data['stop_frame'] else len(media_files), len(media_files)), db_data.get_frame_step())