From a8cf4bd01625ebd341d32ec735a4b885db4c8118 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sat, 18 Jul 2026 16:32:10 +0200 Subject: Accept blank template names in the allowlist validations --- app/models/node.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/models/node.rb') diff --git a/app/models/node.rb b/app/models/node.rb index b5b18a1..a440c2f 100644 --- a/app/models/node.rb +++ b/app/models/node.rb @@ -31,9 +31,9 @@ class Node < ApplicationRecord validate :reserved_slug_stays_reserved validate :no_head_inside_trash validates :default_template_name, - :inclusion => { :in => ->(_) { Page.custom_templates } }, - :allow_nil => true, - :if => :default_template_name_changed? + :inclusion => { :in => ->(_) { Page.custom_templates } }, + :allow_blank => true, + :if => :default_template_name_changed? # Everything outside the Trash subtree, the Trash node included. # Relies on unique_name being authoritative for tree position -- -- cgit v1.3