Merge pull request #1418 from mlorb/ml-sci-2905

Fix due date can not be set [SCI-2905]
This commit is contained in:
mlorb 2018-12-12 11:27:57 +01:00 committed by GitHub
commit 3f79cc5f93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,7 +147,8 @@ class MyModulesController < ApplicationController
update_params = my_module_params
if update_params[:due_date].present?
update_params[:due_date] = Time.strptime(
update_params[:due_date], I18n.backend.date_format.dup.delete('-')
update_params[:due_date].delete('-'),
I18n.backend.date_format.dup.delete('-')
)
end
@my_module.assign_attributes(update_params)