Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

[34289] Avoid duplicate output of error messages in flash

Oliver Günther5d753deffee8
diff --git a/app/controllers/custom_fields_controller.rb b/app/controllers/custom_fields_controller.rb
index b3fb38376cc..67b37fcdea0 100644
--- a/app/controllers/custom_fields_controller.rb
+++ b/app/controllers/custom_fields_controller.rb
@@ -65,7 +65,6 @@ class CustomFieldsController < ApplicationController
call_hook(:controller_custom_fields_new_after_save, custom_field: call.result)
redirect_to custom_fields_path(tab: call.result.class.name)
else
- flash[:error] = call.message || I18n.t('notice_internal_server_error')
@custom_field = call.result || new_custom_field
render action: 'new'
end
@@ -83,7 +82,6 @@ class CustomFieldsController < ApplicationController
call_hook(:controller_custom_fields_edit_after_save, custom_field: @custom_field)
redirect_back_or_default edit_custom_field_path(id: @custom_field.id)
else
- flash[:error] = call.message || I18n.t('notice_internal_server_error')
render action: 'edit'
end
end