mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-12-29 13:15:40 +01:00
Fix Rails/WhereExists
cop in User model (#28792)
This commit is contained in:
parent
81e4e65610
commit
9fb9ef418a
2 changed files with 1 additions and 2 deletions
|
@ -85,7 +85,6 @@ Rails/WhereExists:
|
|||
- 'app/models/poll.rb'
|
||||
- 'app/models/session_activation.rb'
|
||||
- 'app/models/status.rb'
|
||||
- 'app/models/user.rb'
|
||||
- 'app/policies/status_policy.rb'
|
||||
- 'app/serializers/rest/announcement_serializer.rb'
|
||||
- 'app/serializers/rest/tag_serializer.rb'
|
||||
|
|
|
@ -434,7 +434,7 @@ class User < ApplicationRecord
|
|||
end
|
||||
|
||||
def sign_up_from_ip_requires_approval?
|
||||
!sign_up_ip.nil? && IpBlock.where(severity: :sign_up_requires_approval).where('ip >>= ?', sign_up_ip.to_s).exists?
|
||||
sign_up_ip.present? && IpBlock.sign_up_requires_approval.exists?(['ip >>= ?', sign_up_ip.to_s])
|
||||
end
|
||||
|
||||
def sign_up_email_requires_approval?
|
||||
|
|
Loading…
Reference in a new issue