Skip to content

Commit 5ba6246

Browse files
committed
removing debug statements and unnecessary error code
1 parent a667a81 commit 5ba6246

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

src/dispatch/signal/service.py

-9
Original file line numberDiff line numberDiff line change
@@ -999,10 +999,6 @@ def get_signal_data(
999999
).filter(cast(SignalFilter.expression, JSONB).op("@>")(entity_subquery))
10001000

10011001
snooze_result = db_session.execute(query).fetchone()
1002-
if snooze_result:
1003-
print(
1004-
f"Active Count: {snooze_result.active_count}, Expired Count: {snooze_result.expired_count}"
1005-
)
10061002

10071003
# Calculate the date threshold based on num_days
10081004
date_threshold = datetime.utcnow() - timedelta(days=num_days) if num_days is not None else None
@@ -1037,11 +1033,6 @@ def get_signal_data(
10371033
)
10381034

10391035
signal_result = db_session.execute(query).fetchone()
1040-
if signal_result:
1041-
print(
1042-
f"Count with Snooze: {signal_result.count_with_snooze}, "
1043-
f"Count without Snooze: {signal_result.count_without_snooze}"
1044-
)
10451036

10461037
return SignalData(
10471038
num_signals_alerted=signal_result.count_without_snooze,

src/dispatch/signal/views.py

-5
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,6 @@ def return_signal_data(
297297
entity_type_id=entity_type_id,
298298
num_days=num_days,
299299
)
300-
if not signal_data:
301-
raise HTTPException(
302-
status_code=status.HTTP_404_NOT_FOUND,
303-
detail=[{"msg": "No signals with that entity name were found."}],
304-
)
305300
return signal_data
306301

307302

0 commit comments

Comments
 (0)