From 2fbc4e32fc1d90fe2003b72952d6c0a794d987e6 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 10 May 2017 18:50:21 +0200 Subject: Context record wizard: fix relation form --- archaeological_context_records/wizards.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'archaeological_context_records/wizards.py') diff --git a/archaeological_context_records/wizards.py b/archaeological_context_records/wizards.py index fd48ef3d9..cbeb1c1d2 100644 --- a/archaeological_context_records/wizards.py +++ b/archaeological_context_records/wizards.py @@ -134,6 +134,14 @@ class RecordModifWizard(RecordWizard): model = models.ContextRecord filter_owns = {'selec-record_modification': ['pk']} + def get_form_kwargs(self, step, **kwargs): + kwargs = super(RecordModifWizard, self).get_form_kwargs( + step, **kwargs) + if step != "relations-record_modification": + return kwargs + kwargs["left_record"] = self.get_current_object() + return kwargs + class RecordDeletionWizard(DeletionWizard): model = models.ContextRecord -- cgit v1.2.3