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)
|
created = datetime.fromtimestamp(file.stat().st_ctime)
|
||||||
|
|
||||||
# If scanner_type is specified, apply appropriate filtering
|
# If scanner_type is specified, apply appropriate filtering
|
||||||
if scanner_type == "technical":
|
if scanner_type == "canslim":
|
||||||
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 not file.name.startswith("canslim_"):
|
if not file.name.startswith("canslim_"):
|
||||||
print(f"Skipping {file.name} - not a CANSLIM report") # Debug print
|
print(f"Skipping {file.name} - not a CANSLIM report") # Debug print
|
||||||
continue
|
continue
|
||||||
elif scanner_type == "non_canslim":
|
elif scanner_type == "non_canslim":
|
||||||
# Accept any file that doesn't start with "canslim_"
|
|
||||||
if file.name.startswith("canslim_"):
|
if file.name.startswith("canslim_"):
|
||||||
print(f"Skipping {file.name} - is a CANSLIM report") # Debug print
|
print(f"Skipping {file.name} - is a CANSLIM report") # Debug print
|
||||||
continue
|
continue
|
||||||
# No other conditions - accept all non-CANSLIM files
|
|
||||||
|
|
||||||
reports.append({
|
reports.append({
|
||||||
'name': file.name,
|
'name': file.name,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user