refactor: Update report filtering logic to match specific scanner naming patterns
This commit is contained in:
parent
c1382ba694
commit
f4f7505e5c
@ -23,9 +23,12 @@ def load_scanner_reports(scanner_type: str = None):
|
|||||||
# Get file creation time
|
# Get file creation time
|
||||||
created = datetime.fromtimestamp(file.stat().st_ctime)
|
created = datetime.fromtimestamp(file.stat().st_ctime)
|
||||||
|
|
||||||
# If scanner_type is specified, only include matching reports
|
# If scanner_type is specified, filter based on actual naming patterns
|
||||||
if scanner_type:
|
if scanner_type == "technical":
|
||||||
if not file.name.lower().startswith(scanner_type.lower()):
|
if not (file.name.startswith(("atr_ema_", "sunny_"))):
|
||||||
|
continue
|
||||||
|
elif scanner_type == "canslim":
|
||||||
|
if not file.name.startswith("canslim_"):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
reports.append({
|
reports.append({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user