Skip to content

Commit

Permalink
add logging when we remove old entry
Browse files Browse the repository at this point in the history
  • Loading branch information
Highfire1 committed Nov 28, 2024
1 parent 5381054 commit 48cf708
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions sdk/fetch_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def updateDataFromNotion(writeLocation="data/"):
full_image_path = f"data/event_images/{event_id}.{ext}"
if exists(full_image_path):
os.remove(full_image_path)
logger.info(f"Removed image for event {event_id} at {full_image_path}.") # Log removal

for page in event_pages["results"]:
page_updated = False
Expand Down
1 change: 1 addition & 0 deletions sdk/fetch_execs.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def updateDataFromNotion(writeLocation="data/"):
full_image_path = f"{writeLocation}/exec_images/{student_id}.{ext}"
if exists(full_image_path):
os.remove(full_image_path)
logger.info(f"Removed image for executive {student_id} at {full_image_path}.") # Log removal


for page in exec_pages["results"]:
Expand Down

0 comments on commit 48cf708

Please sign in to comment.