From eeaa949a1e31c4fe74f1d6f333bc293c3aef646c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Mon, 5 Nov 2018 15:00:47 +0100 Subject: [PATCH] [28902] Don't fail hard on missing CF date https://community.openproject.com/wp/28902 --- app/models/custom_actions/actions/strategies/date.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/custom_actions/actions/strategies/date.rb b/app/models/custom_actions/actions/strategies/date.rb index c229345aad..086ae38b2a 100644 --- a/app/models/custom_actions/actions/strategies/date.rb +++ b/app/models/custom_actions/actions/strategies/date.rb @@ -38,7 +38,10 @@ module CustomActions::Actions::Strategies::Date end def apply(work_package) - work_package.send("#{self.class.key}=", date_to_apply) + accessor = :"#{self.class.key}=" + if work_package.respond_to? accessor + work_package.send(accessor, date_to_apply) + end end private