From 1c18b966dbc92a5c032a67319d5ae06902528303 Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Fri, 3 Nov 2023 23:32:52 +0100 Subject: [PATCH] Negate empty theme check Co-authored-by: Georg Gadinger --- app/controllers/user_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 91401181..59895d90 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -22,7 +22,7 @@ class UserController < ApplicationController def show_theme theme = Theme.where(user: User.where("LOWER(screen_name) = ?", params[:username].downcase).select(:id)).first - return head :no_content if theme.nil? + return head :no_content unless theme expires_in 3.months return if fresh_when theme, public: true