diff --git a/uvdat/core/tasks/dataset.py b/uvdat/core/tasks/dataset.py index dcce2cad..d2b83b5e 100644 --- a/uvdat/core/tasks/dataset.py +++ b/uvdat/core/tasks/dataset.py @@ -20,10 +20,7 @@ def convert_dataset( dataset.save() # remove any existing generated files - generated_files = FileItem.objects.filter( - dataset=dataset, - metadata__generated=True - ).delete() + generated_files = FileItem.objects.filter(dataset=dataset, metadata__generated=True).delete() if dataset.dataset_type == dataset.DatasetType.RASTER: RasterMapLayer.objects.filter(dataset=dataset).delete() diff --git a/uvdat/core/tasks/map_layers.py b/uvdat/core/tasks/map_layers.py index 51e59d4f..674932db 100644 --- a/uvdat/core/tasks/map_layers.py +++ b/uvdat/core/tasks/map_layers.py @@ -66,7 +66,7 @@ def split_raster_zip(file_item, style_options): archive_file.write(file_item.file.open('rb').read()) # unzip all with zipfile.ZipFile(archive_path) as zip_archive: - zip_archive.extractall(extracted_path) + zip_archive.extractall(extracted_path) # read VRT files vrt_files = list(extracted_path.glob('**/*.vrt')) vrt_files.sort() # rely on filenames for ordering @@ -88,9 +88,7 @@ def split_raster_zip(file_item, style_options): metadata=metadata, ) with open(cog_filepath, 'rb') as cog: - new_file_item.file.save( - cog_filepath, ContentFile(cog.read()) - ) + new_file_item.file.save(cog_filepath, ContentFile(cog.read())) if cog_size > 0: create_raster_map_layer(new_file_item, style_options)