mirror of
https://github.com/Extraltodeus/test_my_prompt.git
synced 2026-01-26 11:19:48 +00:00
Bug fix for a Bug Fix test_my_prompt_custom_script.py
Changed the checks for `state.skippped` due to a bad interaction with `excluded_keywords` . It was possible for a user to cause a `job_no` calculation error if the `skipped` command was called when an `excluded_keyword` job should be skipped. This fixes it so that the user cannot cause a calculation error using the `skipped` command by incrementing the `excluded_jobs` count when a excluded keyword is present.
This commit is contained in:
@@ -82,6 +82,8 @@ class Script(scripts.Script):
|
||||
if state.skipped:
|
||||
print("Job skipped.")
|
||||
state.skipped = False
|
||||
if f >= 0 and prompt_array[f].strip() in excluded_keywords_list:
|
||||
exluded_jobs = exluded_jobs + 1
|
||||
continue
|
||||
|
||||
# Check for excluded keywords
|
||||
|
||||
Reference in New Issue
Block a user