Skip to content

Commit

Permalink
[#2540] Fix context type set in signals
Browse files Browse the repository at this point in the history
  • Loading branch information
pbanaszkiewicz committed Nov 7, 2023
1 parent c59689c commit ea06443
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions amy/emails/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
InstructorDeclinedContext,
InstructorSignupContext,
InstructorTrainingApproachingContext,
InstructorTrainingCompletedNotBadgedContext,
PersonsMergedContext,
)

Expand Down Expand Up @@ -94,19 +95,19 @@ def __init__(self, *args, **kwargs):
)
instructor_training_completed_not_badged_signal = Signal(
signal_name=INSTRUCTOR_TRAINING_COMPLETED_NOT_BADGED_SIGNAL_NAME,
context_type=InstructorTrainingApproachingContext,
context_type=InstructorTrainingCompletedNotBadgedContext,
)
# Emitted when conditions for the previous signal may have changed and
# the email should be re-calculated.
instructor_training_completed_not_badged_update_signal = Signal(
signal_name=INSTRUCTOR_TRAINING_COMPLETED_NOT_BADGED_SIGNAL_NAME,
context_type=InstructorTrainingApproachingContext,
context_type=InstructorTrainingCompletedNotBadgedContext,
)
# Emitted when conditions for the previous signal may have changed and
# the email should be cancelled.
instructor_training_completed_not_badged_remove_signal = Signal(
signal_name=INSTRUCTOR_TRAINING_COMPLETED_NOT_BADGED_SIGNAL_NAME,
context_type=InstructorTrainingApproachingContext,
context_type=InstructorTrainingCompletedNotBadgedContext,
)

ALL_SIGNALS = [item for item in locals().values() if isinstance(item, Signal)]

0 comments on commit ea06443

Please sign in to comment.