-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revert signal logic as something is not working with it (#3137)
- Loading branch information
1 parent
2e89e1e
commit 8dcd85f
Showing
1 changed file
with
13 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
from django.db.models.signals import pre_delete, pre_save | ||
from django.dispatch import receiver | ||
# from django.db.models.signals import pre_delete, pre_save | ||
# from django.dispatch import receiver | ||
|
||
from .models import Attendee, EventUserAction | ||
# from .models import Attendee, EventUserAction | ||
|
||
|
||
@receiver(signal=pre_save, sender=Attendee) | ||
def handle_payment_relation_status_change(sender, instance: Attendee, **kwargs): | ||
EventUserAction.objects.create( | ||
user=instance.user, event=instance.event.event, type="register" | ||
) | ||
# @receiver(signal=pre_save, sender=Attendee) | ||
# def handle_payment_relation_status_change(sender, instance: Attendee, **kwargs): | ||
# EventUserAction.objects.create( | ||
# user=instance.user, event=instance.event.event, type="register" | ||
# ) | ||
|
||
|
||
@receiver(signal=pre_delete, sender=Attendee) | ||
def handle_payment_transaction_status_change(sender, instance: Attendee, **kwargs): | ||
EventUserAction.objects.create( | ||
user=instance.user, event=instance.event.event, type="unregister" | ||
) | ||
# @receiver(signal=pre_delete, sender=Attendee) | ||
# def handle_payment_transaction_status_change(sender, instance: Attendee, **kwargs): | ||
# EventUserAction.objects.create( | ||
# user=instance.user, event=instance.event.event, type="unregister" | ||
# ) |