From 4d316c7a4a9857409fde0320d3142ac39ecfd0e5 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Thu, 18 May 2017 18:02:44 +0100 Subject: [PATCH] Stop authorisation information being duplicated with an event --- RIGS/rigboard.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RIGS/rigboard.py b/RIGS/rigboard.py index e9597ab5..e4c124c2 100644 --- a/RIGS/rigboard.py +++ b/RIGS/rigboard.py @@ -138,6 +138,11 @@ class EventDuplicate(EventUpdate): new = copy.copy(old) # Make a copy of the object in memory new.based_on = old # Make the new event based on the old event + # Remove all the authorisation information from the new event + new.auth_request_to = None + new.auth_request_by = None + new.auth_request_at = None + if self.request.method in ( 'POST', 'PUT'): # This only happens on save (otherwise items won't display in editor) new.pk = None # This means a new event will be created on save, and all items will be re-created