From 809957d9d6ca8526e2320010eddb4fe987ba37cf Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 16 Nov 2022 19:12:44 +0100 Subject: Operation wizard: remove dead code --- archaeological_operations/wizards.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'archaeological_operations/wizards.py') diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py index cafb7598b..918226e96 100644 --- a/archaeological_operations/wizards.py +++ b/archaeological_operations/wizards.py @@ -90,8 +90,6 @@ class OperationWizard(Wizard): """ context = super(OperationWizard, self).get_context_data(form, **kwargs) step = self.steps.current - if step.startswith("general"): - context["TOWNS"] = self.get_towns() # reminder of the current file reminder = self.get_reminder() if reminder: @@ -119,17 +117,9 @@ class OperationWizard(Wizard): if data: data = data.copy() else: - data = {} + data = None if not step: step = self.steps.current - try: - form = self.get_form_list()[step] - except KeyError: - raise Http404() - # manage the dynamic choice of towns - if step.startswith("towns") and hasattr(form, "management_form"): - data["TOWNS"] = self.get_towns() - data = data or None form = super(OperationWizard, self).get_form(step, data, files) return form -- cgit v1.2.3