lib/jss/api_object/policy.rb in ruby-jss-1.5.2 vs lib/jss/api_object/policy.rb in ruby-jss-1.5.3

- old
+ new

@@ -327,10 +327,10 @@ raise JSS::InvalidDataError, "period must be one of these symbols: :#{LOG_FLUSH_INTERVAL_PERIODS.keys.join ', :'}" unless period computers = [computers] unless computers.is_a? Array # log flushes can be really slow - api.timeout = 1800 unless orig_timeout > 1800 + api.timeout = 1800 unless orig_timeout && orig_timeout > 1800 return api.delete_rsrc "#{LOG_FLUSH_RSRC}/policy/id/#{pol_id}/interval/#{older_than}+#{period}" if computers.empty? flush_logs_for_specific_computers pol_id, older_than, period, computers, api ensure