mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 13:32:15 +00:00
Bug fix for #30
This commit is contained in:
@@ -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']
|
||||
'person', 'organisation', 'dry_hire', 'checked_in_by', 'status']
|
||||
@@ -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'])
|
||||
|
||||
Reference in New Issue
Block a user