summaryrefslogtreecommitdiff
path: root/archaeological_finds
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2025-09-23 11:40:57 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2025-09-23 11:49:27 +0200
commitc07380618dbcc61ea00a8d9b7cc03a44221edd49 (patch)
treef807ded70bcf67185ca845f75c49a94deca6d2bd /archaeological_finds
parent813e90e6e86c08cac477ee17e48c4787d6620acb (diff)
downloadIshtar-c07380618dbcc61ea00a8d9b7cc03a44221edd49.tar.bz2
Ishtar-c07380618dbcc61ea00a8d9b7cc03a44221edd49.zip
🐛 fix treatment request creation from find basket
Diffstat (limited to 'archaeological_finds')
-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))