From dafb53401594bbcfba293263e02746435306188e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20=20MENAGER?= <herve.menager@pasteur.fr> Date: Thu, 28 Sep 2017 17:04:39 +0200 Subject: [PATCH] correct get_context_data in wizard Former-commit-id: f3e0f0bcd8a6f1a73c9b5cdcd8d6f15aa1ac7ddf --- ippisite/ippidb/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ippisite/ippidb/views.py b/ippisite/ippidb/views.py index 3d63a0a5..00ea6df6 100644 --- a/ippisite/ippidb/views.py +++ b/ippisite/ippidb/views.py @@ -74,8 +74,9 @@ class IppiWizard(NamedUrlSessionWizardView): def get_context_data(self, **kwargs): context=super(IppiWizard, self).get_context_data(**kwargs) - context['complex_type']=self.storage.get_step_data('ProteinDomainComplexTypeForm').get('complex_type') - context['complex_choice']=self.storage.get_step_data('ProteinDomainComplexTypeForm').get('complex_choice') + if self.steps.current == 'ProteinDomainComplexForm': + context['complex_type']=self.storage.get_step_data('ProteinDomainComplexTypeForm').get('complex_type') + context['complex_choice']=self.storage.get_step_data('ProteinDomainComplexTypeForm').get('complex_choice') return context def get_template_names(self): -- GitLab