DinoPLayZ commited on
Commit
1ba35b3
·
verified ·
1 Parent(s): 4609168

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -2
main.py CHANGED
@@ -364,10 +364,10 @@ def send_event_alerts(events):
364
  for ev in events:
365
  loc = str(ev.get("location", "")).lower()
366
  name = str(ev.get("event_name", "")).lower()
367
- apply_student = str(ev.get("apply_by_student", "")).lower()
368
 
369
  # Check if event is online
370
- is_online = "online" in loc or "virtual" in loc or "hybrid" in loc
371
 
372
  # Check if event is applicable for EEE
373
  eee_allowed = not ("only for" in name and "eee" not in name)
@@ -388,6 +388,7 @@ def send_event_alerts(events):
388
 
389
  online_msg = build_html_msg(online_events)
390
  send_email_message(online_subject, online_msg, is_html=True, recipient=ONLINE_EVENT_EMAIL_RECIPIENT)
 
391
  except Exception as e:
392
  logger.error(f"Failed to process/send online event alert: {e}")
393
 
 
364
  for ev in events:
365
  loc = str(ev.get("location", "")).lower()
366
  name = str(ev.get("event_name", "")).lower()
367
+ apply_student = str(ev.get("apply_by_student", "")).lower().strip()
368
 
369
  # Check if event is online
370
+ is_online = "online" in loc or "virtual" in loc or "hybrid" in loc or "dual" in loc
371
 
372
  # Check if event is applicable for EEE
373
  eee_allowed = not ("only for" in name and "eee" not in name)
 
388
 
389
  online_msg = build_html_msg(online_events)
390
  send_email_message(online_subject, online_msg, is_html=True, recipient=ONLINE_EVENT_EMAIL_RECIPIENT)
391
+ logger.info("✅ ONLINE event email sent successfully")
392
  except Exception as e:
393
  logger.error(f"Failed to process/send online event alert: {e}")
394