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

Bust cache when removing logo

Oliver Güntherb3ddf6878c2e
diff --git a/app/controllers/custom_styles_controller.rb b/app/controllers/custom_styles_controller.rb
index 3eacc1d00a7..236933b16a4 100644
--- a/app/controllers/custom_styles_controller.rb
+++ b/app/controllers/custom_styles_controller.rb
@@ -197,7 +197,6 @@ class CustomStylesController < ApplicationController
end
@custom_style.send(remove_method)
- @custom_style.save
redirect_to custom_style_path
end
end
diff --git a/app/models/custom_style.rb b/app/models/custom_style.rb
index 38d1cbffd23..8070b6ba966 100644
--- a/app/models/custom_style.rb
+++ b/app/models/custom_style.rb
@@ -35,7 +35,7 @@ class CustomStyle < ApplicationRecord
image = send(name)
image&.remove!
- update_column name, nil
+ update_columns(name => nil, updated_at: Time.zone.now)
end
end
end