diff --git a/init.rb b/init.rb index 2762b0d..f3c410a 100644 --- a/init.rb +++ b/init.rb @@ -21,7 +21,7 @@ map.project_module :issue_tracking do |map| map.permission :view_checklists, {} map.permission :done_checklists, { issue_checklist: :done } - map.permission :edit_checklists, { issue_checklist: :delete, issue_checklist: :done } + map.permission :edit_checklists, { issue_checklist: [:delete, :done] } end end diff --git a/lib/redmine_issue_checklist/hooks/model_issue_hook.rb b/lib/redmine_issue_checklist/hooks/model_issue_hook.rb index 9ae0d54..0c7509d 100644 --- a/lib/redmine_issue_checklist/hooks/model_issue_hook.rb +++ b/lib/redmine_issue_checklist/hooks/model_issue_hook.rb @@ -37,7 +37,7 @@ def controller_issues_new_after_save(context={}) def save_checklist_to_issue(context, create_journal) issue = context[:issue] checklist_items = context[:params] && context[:params][:check_list_items] - issue.update_checklist_items(checklist_items, create_journal) if issue && checklist_items + issue.update_checklist_items(checklist_items, create_journal) if issue end end