From 17ea2246ca2afa869acdbf8ace39f125a4519b89 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Thu, 2 Apr 2020 15:43:41 +0200 Subject: [PATCH] Remove useless field in activities --- apps/activity/models.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/apps/activity/models.py b/apps/activity/models.py index e3ff0c2f..ed2d94c9 100644 --- a/apps/activity/models.py +++ b/apps/activity/models.py @@ -73,15 +73,6 @@ class Activity(models.Model): verbose_name=_('organizer'), ) - note = models.ForeignKey( - 'note.Note', - on_delete=models.PROTECT, - blank=True, - null=True, - related_name='+', - verbose_name=_('note'), - ) - attendees_club = models.ForeignKey( 'member.Club', on_delete=models.PROTECT, @@ -160,9 +151,7 @@ class Entry(models.Model): if insert and self.guest: GuestTransaction.objects.create( source=self.note, - source_alias=self.note.user.username, - destination=self.note, - destination_alias=self.activity.organizer.name, + destination=self.activity.organizer.note, quantity=1, amount=self.activity.activity_type.guest_entry_fee, reason="Invitation " + self.activity.name + " " + self.guest.first_name + " " + self.guest.last_name,