|
@@ -3,7 +3,7 @@ from django.urls import reverse
|
|
|
from django.contrib.auth.models import User as AuthUser
|
|
|
from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation
|
|
|
from django.contrib.contenttypes.models import ContentType
|
|
|
-from django.core.urlresolvers import reverse
|
|
|
+from django.urls import reverse
|
|
|
from django.utils.html import format_html
|
|
|
|
|
|
from djadhere.utils import get_active_filter
|
|
@@ -82,8 +82,8 @@ class Adhesion(models.Model):
|
|
|
notes = models.TextField(blank=True, default='')
|
|
|
active_legacy = models.NullBooleanField(default=None, verbose_name='Adhésion en cours')
|
|
|
|
|
|
- user = models.OneToOneField(User, null=True)
|
|
|
- corporation = models.OneToOneField(Corporation, null=True)
|
|
|
+ user = models.OneToOneField(User, null=True, on_delete=models.PROTECT)
|
|
|
+ corporation = models.OneToOneField(Corporation, null=True, on_delete=models.PROTECT)
|
|
|
|
|
|
membership = models.OneToOneField(RecurringPayment, on_delete=models.CASCADE)
|
|
|
|