Update ip_spamlist_urls_scheduler.rb

This commit is contained in:
Shlee 2024-02-17 01:18:57 +10:30 committed by GitHub
parent 860d4c1da8
commit 47b25d80af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -57,14 +57,14 @@ class Scheduler::IPSpamlistURLScheduler
def add_ip_limit_addresses!
@limitips.each do |ip|
ip_limit = Iplimit.find_by(ip: ip)
ip_limit = IpBlock.find_by(ip: ip)
if ip_limit.present?
ip_limit.update(expires_in: 24.hours.to_i)
next
end
Iplimit.create(
IpBlock.create(
ip: ip,
severity: :sign_up_requires_approval,
comment: 'Scheduled IPLimit',