diff --git a/app/api/mobile/apis/memos.rb b/app/api/mobile/apis/memos.rb index 4e8f4f97..89412316 100644 --- a/app/api/mobile/apis/memos.rb +++ b/app/api/mobile/apis/memos.rb @@ -34,7 +34,7 @@ module Mobile Rails.logger.info("####11111222##{@env['HTTP_X_REAL_IP']}") ip = @env['HTTP_X_REAL_IP'] ua = UserAgent.where(:ip => ip) - unless ua + if ua.blank? UserAgent.create!(:key => params[:edu].strip, :ip => ip, :type => UserAgent::AD) end end