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'])