From 295e6e236b19d8153ae77bbfc3ad6d566027e64b Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 18 Oct 2021 17:51:03 +0100 Subject: [PATCH] . --- anatomy/views.py | 5 +++-- rapids/views.py | 4 ---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/anatomy/views.py b/anatomy/views.py index ad21b6ab..66522057 100644 --- a/anatomy/views.py +++ b/anatomy/views.py @@ -821,9 +821,10 @@ class QuestionClone(AnatomyQuestionCreateBase): old_object = get_object_or_404(AnatomyQuestion, pk=self.kwargs["pk"]) initial_data = model_to_dict(old_object, exclude=["id"]) - exams = old_object.exams.all().values_list("id", flat=True) + # We don't want to clone the exam details + #exams = old_object.exams.all().values_list("id", flat=True) - initial_data["exams"] = list(exams) + #initial_data["exams"] = list(exams) return initial_data diff --git a/rapids/views.py b/rapids/views.py index 327db326..3333792e 100755 --- a/rapids/views.py +++ b/rapids/views.py @@ -384,10 +384,6 @@ class RapidUpdate( class RapidClone(RapidCreateBase): """Clones a existing rapid""" - # fields = '__all__' - # #fields = [ 'condition' ] - # #initial = {'date_of_death': '05/01/2018'} - # exclude = [ 'created_date', 'published_date' ] def get_initial(self): # print(self.request) old_object = get_object_or_404(Rapid, pk=self.kwargs["pk"])