Skip to content

Commit f7d3518

Browse files
authored
Merge pull request #3560 from rabits/fix_history_store_in_project
Ability to not store the history in the project
2 parents eba530b + a3d909e commit f7d3518

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/classes/updates.py

+3
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ def save_history(self, project, history_length):
172172
# Loop through each updateAction object and serialize
173173
# Ignore any load actions or history update actions
174174
history_length_int = int(history_length)
175+
if history_length_int == 0:
176+
self.update_untracked(["history"], {"redo": [], "undo": []})
177+
return
175178
for action in self.redoHistory[-history_length_int:]:
176179
if action.type != "load" and action.key[0] != "history":
177180
actionDict = json.loads(action.json(), strict=False)

0 commit comments

Comments
 (0)