mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:30:26 -06:00
no need to log anything if term is blank
This commit is contained in:
parent
2f8a8dbb21
commit
2d2602edf0
@ -36,6 +36,8 @@ class SearchLog < ActiveRecord::Base
|
||||
|
||||
def self.log(term:, search_type:, ip_address:, user_id: nil)
|
||||
|
||||
return [:error] if term.blank?
|
||||
|
||||
search_type = search_types[search_type]
|
||||
return [:error] unless search_type.present? && ip_address.present?
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user