diff --git a/castellum/appointments/signals.py b/castellum/appointments/signals.py index a536c263c23a2291e2679b8334bd535c4b7006ad..5ced613850cbf30d313fc6d5137c38c6f9e31c93 100644 --- a/castellum/appointments/signals.py +++ b/castellum/appointments/signals.py @@ -45,4 +45,7 @@ def delete_scheduler_appointments_on_save(sender, instance, using, **kwargs): from castellum.recruitment.models import Participation if sender is Participation and instance.status != Participation.INVITED: + # PERF: ignore if instance has not been saved to the database yet + if not instance.pk: + return delete_scheduler_appointments_on_delete(sender, instance, using, **kwargs)