From 896c30881f8f4b5bafc7fc9547934dcd82ed637c Mon Sep 17 00:00:00 2001 From: tomtom5152 Date: Fri, 27 Mar 2015 12:21:21 +0000 Subject: [PATCH] Bug fix for #30 --- RIGS/forms.py | 2 +- RIGS/rigboard.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RIGS/forms.py b/RIGS/forms.py index 6e344b45..fa1a682f 100644 --- a/RIGS/forms.py +++ b/RIGS/forms.py @@ -89,4 +89,4 @@ class EventForm(forms.ModelForm): model = models.Event fields = ['is_rig', 'name', 'venue', 'start_date', 'start_time', 'end_date', 'end_time', 'meet_at', 'access_at', 'description', 'notes', 'mic', - 'person', 'organisation', 'dry_hire', 'based_on', 'checked_in_by', 'status'] \ No newline at end of file + 'person', 'organisation', 'dry_hire', 'checked_in_by', 'status'] \ No newline at end of file diff --git a/RIGS/rigboard.py b/RIGS/rigboard.py index 737b7dc9..0cea5165 100644 --- a/RIGS/rigboard.py +++ b/RIGS/rigboard.py @@ -107,6 +107,7 @@ class EventDuplicate(generic.RedirectView): def get_redirect_url(self, *args, **kwargs): new = get_object_or_404(models.Event, pk=kwargs['pk']) new.pk = None + new.based_on = models.Event.objects.get(pk=kwargs['pk']) new.save() old = get_object_or_404(models.Event, pk=kwargs['pk'])