From 1bc595a23ac29c565d35e0ee4207bb2b23897aa7 Mon Sep 17 00:00:00 2001 From: proffapt Date: Sun, 21 Jul 2024 22:52:32 +0530 Subject: [PATCH] fix: ERP failing at math, messing up indexing order --- mftp/notice.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mftp/notice.py b/mftp/notice.py index 1e469a7..bd9fb57 100644 --- a/mftp/notice.py +++ b/mftp/notice.py @@ -35,11 +35,10 @@ def fetch(headers, session, ssoToken, lsnif): 'Company': row.find('cell[4]').text.strip(), } - if int(id_) < latest_index: + if int(id_) == 1: logging.info(f' [NEW SESSION DETECTED] Requesting {lsnif} reset') latest_index = 0 - - if int(id_) > latest_index: + elif int(id_) > latest_index: notices.append(notice) logging.info(f" [NEW NOTICE]: #{id_} | {notice['Type']} | {notice['Subject']} | {notice['Company']} | {notice['Time']}") else: