Skip to content

Commit ad483fe

Browse files
Fix for Empty except (#164)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 6ece858 commit ad483fe

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,13 +748,15 @@ def project_has_apollos_member(project: dict) -> bool:
748748
target_dt = datetime.fromisoformat(target).date()
749749
days_left = (target_dt - datetime.utcnow().date()).days
750750
except ValueError:
751-
pass
751+
# If the target date is malformed, treat it as missing but log it for debugging.
752+
app.logger.warning("Invalid targetDate %r for project %r", target, proj.get("id"))
752753
if start:
753754
try:
754755
start_dt = datetime.fromisoformat(start).date()
755756
starts_in = (start_dt - datetime.utcnow().date()).days
756757
except ValueError:
757-
pass
758+
# If the start date is malformed, treat it as missing but log it for debugging.
759+
app.logger.warning("Invalid startDate %r for project %r", start, proj.get("id"))
758760
proj["days_left"] = days_left
759761
proj["starts_in"] = starts_in
760762

0 commit comments

Comments
 (0)