Files
discourse/spec/integration
Krzysztof Kotlarek c02445a2ca FIX: Prevent deletion of custom color palettes when installing themes (#35754)
When installing a new theme, custom color palettes (with theme_id = nil)
were being incorrectly deleted. This occurred because the theme
installation process called `update_theme_color_schemes` before the new
theme was persisted to the database.

Since the theme's ID was nil, the query
`ColorScheme.unscoped.where(theme_id: nil)` would match ALL custom color
schemes, causing them to be deleted during the cleanup phase.

Bug introduced in this PR -
https://github.com/discourse/discourse/pull/34722
2025-11-03 14:09:46 +08:00
..