Scenario: avoid marking loaded scenario data as modified, that created unwanted copies in database

This commit is contained in:
Dylan Jeannin committed 2026-05-26 11:12:36 +02:00
1 parent 0c7ede5f43
commit a2461af084
3 files changed
+28 -7

No files matched your search

+13
View File
@@ -34,6 +34,7 @@ class StudyStatus(object):
self._status = Status.EDIT
self._scenario = scenario
self._saved = True
self._loading = False
@property
def scenario_id(self):
@@ -86,6 +87,15 @@ class StudyStatus(object):
def is_saved(self):
return self._saved
def is_loading(self):
return self._loading
def start_loading(self):
self._loading = True
def stop_loading(self):
self._loading = False
def save(self):
logger.debug("model status set as saved")
self._saved = True
@@ -97,6 +107,9 @@ class StudyStatus(object):
self._saved = True
def modified(self):
if self._loading:
return
if self._saved:
self.version += 1