Skip to content

Commit

Permalink
Merge pull request #3560 from rabits/fix_history_store_in_project
Browse files Browse the repository at this point in the history
Ability to not store the history in the project
  • Loading branch information
jonoomph authored Oct 16, 2020
2 parents eba530b + a3d909e commit f7d3518
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/classes/updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ def save_history(self, project, history_length):
# Loop through each updateAction object and serialize
# Ignore any load actions or history update actions
history_length_int = int(history_length)
if history_length_int == 0:
self.update_untracked(["history"], {"redo": [], "undo": []})
return
for action in self.redoHistory[-history_length_int:]:
if action.type != "load" and action.key[0] != "history":
actionDict = json.loads(action.json(), strict=False)
Expand Down

0 comments on commit f7d3518

Please sign in to comment.