diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-11-27 20:47:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-27 20:47:29 +0100 |
commit | 57b893d505a6fd0a11b9e53261bc029adee2aa24 (patch) | |
tree | 3853fb6386251db7f774605a4e11a14749f4d134 /app/models | |
parent | c0dcf15d1ec357cedd89025a1b210bdc21422b59 (diff) |
Fix spaces not being stripped in admin account search (#21324)
Fixes #21058 Regression from #18641
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/account_filter.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/account_filter.rb b/app/models/account_filter.rb index e09ce4ec2..3a4ac0492 100644 --- a/app/models/account_filter.rb +++ b/app/models/account_filter.rb @@ -43,13 +43,13 @@ class AccountFilter when 'status' status_scope(value) when 'by_domain' - Account.where(domain: value.to_s) + Account.where(domain: value.to_s.strip) when 'username' - Account.matches_username(value.to_s) + Account.matches_username(value.to_s.strip) when 'display_name' - Account.matches_display_name(value.to_s) + Account.matches_display_name(value.to_s.strip) when 'email' - accounts_with_users.merge(User.matches_email(value.to_s)) + accounts_with_users.merge(User.matches_email(value.to_s.strip)) when 'ip' valid_ip?(value) ? accounts_with_users.merge(User.matches_ip(value).group('users.id, accounts.id')) : Account.none when 'invited_by' |