fix(load_json): use int action id

This commit is contained in:
Nick Perez 2023-11-10 06:30:53 -05:00 committed by GitHub
parent 71cea76ae0
commit 16ffd261bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -1608,11 +1608,11 @@ class KoboldStoryRegister(object):
if "image_gen" not in json_data["actions"][item]:
json_data["actions"][item]["image_gen"] = False
action_id = int(item)
temp[action_id] = json_data['actions'][item]
if action_id >= self.action_count-100: #sending last 100 items to UI
data_to_send.append({"id": action_id, 'action': temp[action_id]})
temp[int(item)] = json_data['actions'][item]
if int(item) >= self.action_count-100: #sending last 100 items to UI
data_to_send.append({"id": item, 'action': temp[int(item)]})
process_variable_changes(self._socketio, "story", 'actions', data_to_send, None)
self.actions = temp