From 12e9870e2aa0659de98a9122fbc4ab16b0877449 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 16 Sep 2024 12:45:00 +0200 Subject: ✨ Context records relations: remove form from the wizard to put in a specific form MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archaeological_context_records/wizards.py | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'archaeological_context_records/wizards.py') diff --git a/archaeological_context_records/wizards.py b/archaeological_context_records/wizards.py index e92d9587e..35b4e02b4 100644 --- a/archaeological_context_records/wizards.py +++ b/archaeological_context_records/wizards.py @@ -119,21 +119,9 @@ class RecordWizard(Wizard): else: current_object = self.get_current_object() data["context_record"] = current_object - elif step.startswith("relations") and hasattr(form, "management_form"): - data["CONTEXT_RECORDS"] = self.get_other_context_records() form = super(RecordWizard, self).get_form(step, data, files) return form - def get_other_context_records(self): - operation = self.get_current_operation() - if not operation: - return [] - q = models.ContextRecord.objects.filter(operation_id=operation.pk) - obj = self.get_current_object() - if obj and obj.pk: - q = q.exclude(pk=obj.pk) - return [(cr.pk, cr.cached_label) for cr in q.all()] - class RecordModifWizard(RecordWizard): modification = True -- cgit v1.2.3