From 65539e4578ebb279d03b09ec011e190b6d1353e0 Mon Sep 17 00:00:00 2001 From: FawazBinSaleem Date: Thu, 13 Feb 2025 12:01:52 -0600 Subject: [PATCH] fix: removed the hardcoded filepath for stack.env --- registration_service/registration_service.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/registration_service/registration_service.py b/registration_service/registration_service.py index 9c924f5..5651c5c 100644 --- a/registration_service/registration_service.py +++ b/registration_service/registration_service.py @@ -16,8 +16,8 @@ from flask import Flask, request, Response, url_for from attendee import Attendee from notion_client import Client, APIResponseError, APIErrorCode -from dotenv import load_dotenv -load_dotenv("/home/spiderman/Documents/devHacks-service/registration_service/stack.env") +# from dotenv import load_dotenv +# load_dotenv("devHacks-service/registration_service/stack.env") DEVCLUB_EMAIL = "umdevclub@gmail.com" @@ -106,7 +106,8 @@ def resend_all(): count += 1 if not qr_sent: logging.info(f"Would resend QR code for page: {page_id}") - # resend_qr_code(page_id) + resend_qr_code(page_id) + confirm_qr(page_id) time.sleep(0.5) next_page = response.get("next_cursor") @@ -114,19 +115,12 @@ def resend_all(): break logging.info(f"Total attendees processed: {count}") - return f"Test completed. {count} attendees processed", 200 + return f"Test completed. {count} attendees processed. Emails Sent", 200 except Exception as e: logging.error(f"Error in resending QR codes: {str(e)}") return "Internal Server Error", 500 - - - - - - - def confirm_qr(page_id): notion.pages.update(page_id, properties={ 'QR Sent': { 'checkbox': True }})