Skip to content

Commit

Permalink
Refs #36575 - Avoid translations during startup on root_pass
Browse files Browse the repository at this point in the history
Fixes: c4bfd47 ("fixes #3725, #4167 - root password validations, remove default password")
  • Loading branch information
ekohl committed Oct 9, 2023
1 parent 16f2914 commit 038c173
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/host/managed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ class Jail < ::Safemode::Jail
delegate :require_ip4_validation?, :require_ip6_validation?, :to => :provision_interface

validates :architecture_id, :presence => true, :if => proc { |host| host.managed }
validates :root_pass, :length => {:minimum => 8, :message => _('should be 8 characters or more')},
validates :root_pass, :length => {:minimum => 8, :message => N_('should be 8 characters or more')},
:presence => {:message => N_('should not be blank - consider setting a global or host group default')},
:if => proc { |host| host.managed && !host.image_build? && build? }
validates :ptable_id, :presence => {:message => N_("can't be blank unless a custom partition has been defined")},
Expand Down

0 comments on commit 038c173

Please sign in to comment.