Skip to content

Commit 56b031d

Browse files
Add check if key exists.
1 parent 4703e3f commit 56b031d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

plugins/tagScenesWithPerfTags/tagScenesWithPerfTags.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,14 @@ def processScene(scene):
7272
PLUGIN_ARGS = json_input["args"]["mode"]
7373
if "processAll" in PLUGIN_ARGS:
7474
processAll()
75-
76-
7775
elif "hookContext" in json_input["args"]:
7876
id = json_input["args"]["hookContext"]["id"]
7977
if (
8078
(
8179
json_input["args"]["hookContext"]["type"] == "Scene.Update.Post"
8280
or "Scene.Create.Post"
83-
) and len(json_input["args"]["hookContext"]["inputFields"]) > 2
81+
) and "inputFields" in json_input["args"]["hookContext"]
82+
and len(json_input["args"]["hookContext"]["inputFields"]) > 2
8483
):
8584
scene = stash.find_scene(id)
8685
processScene(scene)

0 commit comments

Comments
 (0)