summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archaeological_finds/wizards.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/archaeological_finds/wizards.py b/archaeological_finds/wizards.py
index 7f735b066..be189e3b1 100644
--- a/archaeological_finds/wizards.py
+++ b/archaeological_finds/wizards.py
@@ -527,6 +527,14 @@ class TreatmentFileWizard(Wizard):
wizard_done_window = reverse_lazy("show-treatmentfile")
redirect_url = "treatmentfile_modification"
+ def get_form_initial(self, step, data=None):
+ initial = super().get_form_initial(step, data=data)
+ if step != "treatmentfile-treatmentfile_creation":
+ return initial
+ if self.request.GET and "associated_basket" in self.request.GET:
+ initial["associated_basket_id"] = self.request.GET["associated_basket"]
+ return initial
+
def get_formated_data_for_associated_basket_id(self, value):
try:
value = str(models.FindBasket.objects.get(pk=value))