refactor: Simplify report filtering logic by removing technical filter
This commit is contained in:
parent
88345df736
commit
ab5b4a9cd2
@ -31,20 +31,14 @@ def load_scanner_reports(scanner_type: str = None):
|
||||
created = datetime.fromtimestamp(file.stat().st_ctime)
|
||||
|
||||
# If scanner_type is specified, apply appropriate filtering
|
||||
if scanner_type == "technical":
|
||||
if not (file.name.startswith(("atr_ema_", "sunny_"))):
|
||||
print(f"Skipping {file.name} - not a technical report") # Debug print
|
||||
continue
|
||||
elif scanner_type == "canslim":
|
||||
if scanner_type == "canslim":
|
||||
if not file.name.startswith("canslim_"):
|
||||
print(f"Skipping {file.name} - not a CANSLIM report") # Debug print
|
||||
continue
|
||||
elif scanner_type == "non_canslim":
|
||||
# Accept any file that doesn't start with "canslim_"
|
||||
if file.name.startswith("canslim_"):
|
||||
print(f"Skipping {file.name} - is a CANSLIM report") # Debug print
|
||||
continue
|
||||
# No other conditions - accept all non-CANSLIM files
|
||||
|
||||
reports.append({
|
||||
'name': file.name,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user