Merge pull request #483 from nkpz/patch-3

fix(load_json): use int action id
This commit is contained in:
henk717 2024-01-10 23:18:05 +01:00 committed by GitHub
commit b9dace6699
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -1610,11 +1610,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