Skip to content

Commit

Permalink
Merge pull request #696 from pennlabs/pca/logging
Browse files Browse the repository at this point in the history
Make logging code lint
  • Loading branch information
anli5005 authored Jan 16, 2025
2 parents c335fe6 + 677ef78 commit 5edc9ea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions backend/alert/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,11 @@ def accept_webhook(request):
f"to {last_status_update.new_status} (duplicate or erroneous).",
)
elif last_status_update:
logger.error(f"Changing {section} from {prev_status} to {course_status} (last update: {last_status_update.old_status} -> {last_status_update.new_status})")
logger.error(f"{section}: {prev_status} -> {course_status} "
f"(last: {last_status_update.old_status} -> "
f"{last_status_update.new_status})")
else:
logger.error(f"Changing {section} from {prev_status} to {course_status} (no last update)")
logger.error(f"{section}: {prev_status} -> {course_status} (no last)")

alert_for_course_called = False
if should_send_pca_alert(course_term, course_status):
Expand Down

0 comments on commit 5edc9ea

Please sign in to comment.