From 73b2a8094442229eadb06212289d8e117705f009 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Thu, 19 Dec 2013 17:58:45 +0100 Subject: [PATCH] try better duplicate --- teleforma/models/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teleforma/models/core.py b/teleforma/models/core.py index 0ba91915..f5816d4e 100755 --- a/teleforma/models/core.py +++ b/teleforma/models/core.py @@ -99,7 +99,7 @@ class ClonableMixin(object): """Return an identical copy of the instance with a new ID.""" if not self.pk: raise ValueError('Instance must be saved before it can be cloned.') - duplicate = self + duplicate = copy.copy(self) # Setting pk to None tricks Django into thinking this is a new object. duplicate.pk = None duplicate.save() -- 2.39.5