Skip to content

Commit 3307565

Browse files
committed
Flattened and_
1 parent 22e0496 commit 3307565

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

source/app/datamgmt/alerts/alerts_db.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,10 +1070,8 @@ def get_assets_with_cases(added_assets, customer_id, open_cases, closed_cases):
10701070
.join(CaseAssets.case)
10711071
.filter(
10721072
and_(
1073-
and_(
1074-
CaseAssets.asset_name.in_(added_assets),
1075-
close_condition
1076-
),
1073+
CaseAssets.asset_name.in_(added_assets),
1074+
close_condition,
10771075
Cases.client_id == customer_id
10781076
)
10791077
)
@@ -1092,10 +1090,8 @@ def get_iocs_with_cases(added_iocs, customer_id, open_cases, closed_cases):
10921090
.join(Ioc.case)
10931091
.filter(
10941092
and_(
1095-
and_(
1096-
Ioc.ioc_value.in_(added_iocs),
1097-
close_condition,
1098-
),
1093+
Ioc.ioc_value.in_(added_iocs),
1094+
close_condition,
10991095
Cases.client_id == customer_id
11001096
)
11011097
)

0 commit comments

Comments
 (0)