about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-06-01 19:23:31 +0200
committerGitHub <noreply@github.com>2022-06-01 19:23:31 +0200
commit9d4861b4988e07636aa9c02f0732e8228791e9df (patch)
tree3151cad0cb134ec63d1d2ba33d6a32aedee1ca93 /app/models
parentae4f068a845d710c2e60ecf8b49144892505e773 (diff)
Remove dependency on running Redis server for db:setup (#18560)
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index bd94142c4..730ef6293 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -88,7 +88,7 @@ class Account < ApplicationRecord
 
   # Local user validations
   validates :username, format: { with: /\A[a-z0-9_]+\z/i }, length: { maximum: 30 }, if: -> { local? && will_save_change_to_username? && actor_type != 'Application' }
-  validates_with UnreservedUsernameValidator, if: -> { local? && will_save_change_to_username? }
+  validates_with UnreservedUsernameValidator, if: -> { local? && will_save_change_to_username? && actor_type != 'Application' }
   validates :display_name, length: { maximum: 30 }, if: -> { local? && will_save_change_to_display_name? }
   validates :note, note_length: { maximum: 500 }, if: -> { local? && will_save_change_to_note? }
   validates :fields, length: { maximum: 4 }, if: -> { local? && will_save_change_to_fields? }