From 19a3b847eee4788dc4e933be2cb5172c29ebe3fd Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 4 Feb 2025 16:51:13 +0100 Subject: 🐛 operation wizard: do not filter preventive tabs when no file permission is available (refs #6068) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archaeological_operations/views.py | 48 ++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 28 deletions(-) (limited to 'archaeological_operations') diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py index db5721be7..b55efb620 100644 --- a/archaeological_operations/views.py +++ b/archaeological_operations/views.py @@ -208,21 +208,17 @@ ope_crea_condition_dict = { models.OperationType, "operation_type", ), - "preventive-operation_creation": get_check_files_for_operation( - wizards.is_preventive( - "general-operation_creation", - models.OperationType, - "operation_type", - "prev_excavation", - ) + "preventive-operation_creation": wizards.is_preventive( + "general-operation_creation", + models.OperationType, + "operation_type", + "prev_excavation", ), - "preventivediag-operation_creation": get_check_files_for_operation( - wizards.is_preventive( - "general-operation_creation", - models.OperationType, - "operation_type", - "arch_diagnostic", - ) + "preventivediag-operation_creation": wizards.is_preventive( + "general-operation_creation", + models.OperationType, + "operation_type", + "arch_diagnostic", ), "parcelsgeneral-operation_creation": wizards.has_associated_file( "filechoice-operation_creation", negate=True @@ -250,21 +246,17 @@ operation_modif_wizard_steps = [ ope_modif_condition_dict = { - "preventive-operation_modification": get_check_files_for_operation( - wizards.is_preventive( - "general-operation_modification", - models.OperationType, - "operation_type", - "prev_excavation", - ) + "preventive-operation_modification": wizards.is_preventive( + "general-operation_modification", + models.OperationType, + "operation_type", + "prev_excavation", ), - "preventivediag-operation_modification": get_check_files_for_operation( - wizards.is_preventive( - "general-operation_modification", - models.OperationType, - "operation_type", - "arch_diagnostic", - ) + "preventivediag-operation_modification": wizards.is_preventive( + "general-operation_modification", + models.OperationType, + "operation_type", + "arch_diagnostic", ), "judiciary-operation_modification": wizards.is_judiciary( "general-operation_modification", -- cgit v1.2.3