diff --git a/app/classes/gcp.py b/app/classes/gcp.py index c133c77f..fe1df73d 100644 --- a/app/classes/gcp.py +++ b/app/classes/gcp.py @@ -58,9 +58,6 @@ class GCPFile: :param image_ratios dictionary with "imagename" --> "resize_ratio" values :return path to new GCP file """ - if os.path.exists(gcp_file_output): - os.remove(gcp_file_output) - output = [self.raw_srs] for entry in self.iter_entries(): diff --git a/app/models/task.py b/app/models/task.py index 3e911da0..8d0d04cf 100644 --- a/app/models/task.py +++ b/app/models/task.py @@ -897,7 +897,9 @@ class Task(models.Model): try: gcpFile = GCPFile(gcp_path) - return gcpFile.create_resized_copy(gcp_path, image_ratios) + gcpFile.create_resized_copy(gcp_path, image_ratios) + logger.info("Resized GCP file {}".format(gcp_path)) + return gcp_path except Exception as e: logger.warning("Could not resize GCP file {}: {}".format(gcp_path, str(e))) diff --git a/app/tests/test_api_task.py b/app/tests/test_api_task.py index 934e2e63..14beb625 100644 --- a/app/tests/test_api_task.py +++ b/app/tests/test_api_task.py @@ -795,7 +795,7 @@ class TestApiTask(BootTransactionTestCase): worker.tasks.process_pending_tasks() task = Task.objects.get(pk=res.data['id']) - self.assertTrue(task.status == status_codes.COMPLETED) + self.assertEqual(task.status, status_codes.COMPLETED) # Orthophoto files/directories should be missing self.assertFalse(os.path.exists(task.assets_path("odm_orthophoto", "odm_orthophoto.tif")))