Skip to content

Commit ee55353

Browse files
Fix cogent handler status bug (#28)
* (fix): Fix if logic for completed and cancelled cogent handler.
1 parent 9fa126e commit ee55353

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/network_ops_dashboard/reports/circuits/scripts/processhandlers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def process_windstream(wstmtcemails_folder, circuit_id_list):
148148

149149
def process_cogent(folder_path, circuit_id_list):
150150
# Parse Cogent email
151-
excluded_status = ['Cancellation', 'Archived', 'Auto-Archived', 'Auto-Archived-Cktid', 'Completed']
151+
excluded_status = ['Cancelled', 'Archived', 'Auto-Archived', 'Auto-Archived-Cktid', 'Completed']
152152
# Status Patterns
153153
STATUS_PATTERNS = [
154154
("Completed", re.compile(r"\b(maintenance\s+completed|completed\s+maintenance)\b", re.I)),
@@ -260,7 +260,7 @@ def _classify_subject(subject: str):
260260
if mtc_entry.status not in excluded_status:
261261
# only make updates if mtc_id# has not been cancelled, completed, or archived
262262
mtc_entry.status = status
263-
if status != 'Cancelled' or 'Completed':
263+
if status not in ('Cancelled', 'Completed'):
264264
mtc_entry.impact = impact_str
265265
mtc_entry.startdatetime = start_time_str
266266
mtc_entry.enddatetime = end_time_str

0 commit comments

Comments
 (0)