Skip to content

Commit

Permalink
revert signal logic as something is not working with it (#3137)
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikskog authored Feb 21, 2024
1 parent 2e89e1e commit 8dcd85f
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions apps/events/signals.py
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"
# )

0 comments on commit 8dcd85f

Please sign in to comment.