From cb1e05e51ed2b9a37af6c1f9993f4724d3bc349c Mon Sep 17 00:00:00 2001
From: Bryan Brancotte <bryan.brancotte@pasteur.fr>
Date: Fri, 20 May 2022 15:38:53 +0200
Subject: [PATCH] clear all status as images are also removed

---
 jass/models/project.py | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/jass/models/project.py b/jass/models/project.py
index d9767598..88bc7762 100644
--- a/jass/models/project.py
+++ b/jass/models/project.py
@@ -256,11 +256,7 @@ class Project(BaseModel, abc.ABC):
             os.remove(project_hdf_path)
         # as a consequence, its creation will have to be redone, so set progress to 0 and remove is status.
         self.progress = 0
-        try:
-            del self.status['worktable']
-        except KeyError:
-            # worktable not in status
-            pass
+        self.status.clear()
         self.save()
 
         if self.delayed_gen_csv_file:
-- 
GitLab