summaryrefslogtreecommitdiff
path: root/app/models/node.rb
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-18 16:32:10 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-18 16:32:10 +0200
commita8cf4bd01625ebd341d32ec735a4b885db4c8118 (patch)
tree6a42ea2a86a907cc13c9a6447d990ffa3b145a2c /app/models/node.rb
parent0c6783816e0a7a8acad922296d3eb8cc454fb981 (diff)
Accept blank template names in the allowlist validations
Diffstat (limited to 'app/models/node.rb')
-rw-r--r--app/models/node.rb6
1 files changed, 3 insertions, 3 deletions
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
31 validate :reserved_slug_stays_reserved 31 validate :reserved_slug_stays_reserved
32 validate :no_head_inside_trash 32 validate :no_head_inside_trash
33 validates :default_template_name, 33 validates :default_template_name,
34 :inclusion => { :in => ->(_) { Page.custom_templates } }, 34 :inclusion => { :in => ->(_) { Page.custom_templates } },
35 :allow_nil => true, 35 :allow_blank => true,
36 :if => :default_template_name_changed? 36 :if => :default_template_name_changed?
37 37
38 # Everything outside the Trash subtree, the Trash node included. 38 # Everything outside the Trash subtree, the Trash node included.
39 # Relies on unique_name being authoritative for tree position -- 39 # Relies on unique_name being authoritative for tree position --