NoMethodError: undefined method 'id' for nil:NilClass

This commit is contained in:
Karel Pičman 2019-12-23 16:45:26 +01:00
parent 012f041851
commit 6c78dbc603

View File

@ -84,7 +84,7 @@ module RedmineDmsf
controller = context[:controller] controller = context[:controller]
if edit && ((params[:issue] && params[:issue][:project_id].present?) || context[:new_project]) if edit && ((params[:issue] && params[:issue][:project_id].present?) || context[:new_project])
project_id = context[:new_project] ? context[:new_project].id : params[:issue][:project_id].to_i project_id = context[:new_project] ? context[:new_project].id : params[:issue][:project_id].to_i
old_project_id = context[:project].id old_project_id = context[:project] ? context[:project].id : project_id
# Sync the title with the issue's subject # Sync the title with the issue's subject
old_system_folder = issue.system_folder(false, old_project_id) old_system_folder = issue.system_folder(false, old_project_id)
if old_system_folder if old_system_folder