[28902] Don't fail hard on missing CF date

https://community.openproject.com/wp/28902
pull/6811/head
Oliver Günther 6 years ago
parent a62fdba6bd
commit eeaa949a1e
  1. 5
      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

Loading…
Cancel
Save