From 6ab1bda2b7bb0a3fd277bad84b9c9f50a03953a7 Mon Sep 17 00:00:00 2001 From: Marc Durepos Date: Tue, 5 Dec 2023 11:43:24 -0500 Subject: [PATCH] bemade_fsm: bug fix in new_task_from_template.py default_get --- bemade_fsm/wizard/new_task_from_template.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bemade_fsm/wizard/new_task_from_template.py b/bemade_fsm/wizard/new_task_from_template.py index 26d67ba..6c8c5e1 100644 --- a/bemade_fsm/wizard/new_task_from_template.py +++ b/bemade_fsm/wizard/new_task_from_template.py @@ -30,8 +30,7 @@ class NewTaskFromTemplateWizard(models.TransientModel): active_model = self.env.context.get('active_model', False) if not active_model: params = self.env.context.get('params', False) - active_model = params.get('model', False) - + active_model = params and params.get('model', False) if active_model == 'project.task.template' and active_id and 'task_template_id' in fields_list: res.update({'task_template_id': active_id}) if active_model == 'project.task' and 'project_id' in fields_list: