Skip to content

Commit

Permalink
Supported import option use_zip_chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
evekeen committed Mar 19, 2022
1 parent 4034acc commit c941933
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cvat/apps/engine/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def _prepare_data_meta(self, data):
'storage_method',
'storage',
'sorting_method',
'use_zip_chunks',
}

self._prepare_meta(allowed_fields, data)
Expand Down Expand Up @@ -504,8 +505,9 @@ def _write_data(zip_object):
else:
uploaded_files = _write_data(self._file)

data['use_zip_chunks'] = data.pop('chunk_type') == DataChoice.IMAGESET
use_zip_chunks = data.pop('use_zip_chunks', False) or data.pop('chunk_type') == DataChoice.IMAGESET
data = data_serializer.data
data['use_zip_chunks'] = use_zip_chunks
data['client_files'] = uploaded_files
_create_thread(self._db_task.pk, data.copy(), True)
db_data.start_frame = data['start_frame']
Expand Down

0 comments on commit c941933

Please sign in to comment.