File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,19 +93,23 @@ def save(self):
9393 # So if any errors arise, it may be acceptable to ignore them and lose the cached message
9494 # or message group causing the errors.
9595
96+ # Copy data
97+ data : dict = self ._data .copy ()
98+ data_groups : dict = self ._data_groups .copy ()
99+
96100 # Convert data to dictionary
97101 converted = {}
98- for message in self . _data :
102+ for message in data :
99103 try :
100- converted .update ({message : self . _data [message ].to_dict ()})
104+ converted .update ({message : data [message ].to_dict ()})
101105 except AttributeError :
102106 # Assume something is just set to None
103107 continue
104108
105109 converted_groups = {}
106- for group in self . _data_groups :
110+ for group in data_groups :
107111 try :
108- converted_groups .update ({group : self . _data_groups [group ].to_dict ()})
112+ converted_groups .update ({group : data_groups [group ].to_dict ()})
109113 except AttributeError :
110114 # Assume something is just set to None
111115 continue
You can’t perform that action at this time.
0 commit comments