Add soft delete API for signups
This commit is contained in:
+2
-2
@@ -125,7 +125,7 @@ class SignupForm(models.Model):
|
||||
|
||||
class Signup(models.Model):
|
||||
"""
|
||||
In
|
||||
Actual signup into any SignupForm. Deletes are soft.
|
||||
"""
|
||||
|
||||
class Meta:
|
||||
@@ -140,6 +140,7 @@ class Signup(models.Model):
|
||||
email = models.EmailField(blank=True, null=True)
|
||||
# Random unique identifier. Used for signup editing by the user.
|
||||
uuid = models.UUIDField(default=uuid4, editable=False)
|
||||
deleted = models.BooleanField(default=False)
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.signupForm}: {self.list_name} ({self.pk})"
|
||||
@@ -147,7 +148,6 @@ class Signup(models.Model):
|
||||
|
||||
@receiver(post_save, sender=Signup)
|
||||
def email_on_signup(sender, instance, created, **kwargs):
|
||||
"""Send email validation."""
|
||||
if created and instance.email:
|
||||
# TODO: Possible bug due to many-to-many relationship with events and forms.
|
||||
# TODO: Subject field crashes with lazy loaded translations.
|
||||
|
||||
Reference in New Issue
Block a user