forked from Github/Axter-Stash
Fix type error when there is only a single target in json input args (target was an int instead of a string)
This commit is contained in:
@@ -196,17 +196,17 @@ matchPhaseDistanceText = "Exact Match"
|
|||||||
logTraceForAdvanceMenuOpt = False
|
logTraceForAdvanceMenuOpt = False
|
||||||
if (stash.PLUGIN_TASK_NAME == "tag_duplicates_task" or stash.PLUGIN_TASK_NAME == "create_duplicate_report_task") and 'Target' in stash.JSON_INPUT['args']:
|
if (stash.PLUGIN_TASK_NAME == "tag_duplicates_task" or stash.PLUGIN_TASK_NAME == "create_duplicate_report_task") and 'Target' in stash.JSON_INPUT['args']:
|
||||||
stash.enableProgressBar(False)
|
stash.enableProgressBar(False)
|
||||||
if stash.JSON_INPUT['args']['Target'].startswith("0"):
|
if str(stash.JSON_INPUT['args']['Target']).startswith("0"):
|
||||||
matchDupDistance = 0
|
matchDupDistance = 0
|
||||||
elif stash.JSON_INPUT['args']['Target'].startswith("1"):
|
elif str(stash.JSON_INPUT['args']['Target']).startswith("1"):
|
||||||
matchDupDistance = 1
|
matchDupDistance = 1
|
||||||
elif stash.JSON_INPUT['args']['Target'].startswith("2"):
|
elif str(stash.JSON_INPUT['args']['Target']).startswith("2"):
|
||||||
matchDupDistance = 2
|
matchDupDistance = 2
|
||||||
elif stash.JSON_INPUT['args']['Target'].startswith("3"):
|
elif str(stash.JSON_INPUT['args']['Target']).startswith("3"):
|
||||||
matchDupDistance = 3
|
matchDupDistance = 3
|
||||||
|
|
||||||
stash.Trace(f"Target = {stash.JSON_INPUT['args']['Target']}")
|
stash.Trace(f"Target = {stash.JSON_INPUT['args']['Target']}")
|
||||||
targets = stash.JSON_INPUT['args']['Target'].split(":")
|
targets = str(stash.JSON_INPUT['args']['Target']).split(":")
|
||||||
if len(targets) > 1:
|
if len(targets) > 1:
|
||||||
significantTimeDiff = float(targets[1])
|
significantTimeDiff = float(targets[1])
|
||||||
excludeFromReportIfSignificantTimeDiff = True
|
excludeFromReportIfSignificantTimeDiff = True
|
||||||
|
|||||||
Reference in New Issue
Block a user