app/models/foreman_tasks/task/search.rb in foreman-tasks-3.0.3 vs app/models/foreman_tasks/task/search.rb in foreman-tasks-3.0.4

- old
+ new

@@ -18,10 +18,10 @@ LEFT JOIN foreman_tasks_locks AS foreman_tasks_locks_taxonomy#{uniq_suffix} ON (foreman_tasks_locks_taxonomy#{uniq_suffix}.task_id = foreman_tasks_tasks.id AND foreman_tasks_locks_taxonomy#{uniq_suffix}.resource_type = '#{resource_type}') SQL # Select only those tasks which either have the correct taxonomy or are not related to any - sql = "foreman_tasks_locks_taxonomy#{uniq_suffix}.resource_id #{operator} ? OR foreman_tasks_locks_taxonomy#{uniq_suffix}.resource_id IS NULL" + sql = "foreman_tasks_locks_taxonomy#{uniq_suffix}.resource_id #{operator} (?) OR foreman_tasks_locks_taxonomy#{uniq_suffix}.resource_id IS NULL" { :conditions => sanitize_sql_for_conditions([sql, value]), :joins => joins } end # Expects the time in the format "\d+ (seconds|minutes|hours|days|months|years)" SUPPORTED_DURATION_FORMAT = /\A\s*(\d+(\s+\b(seconds?|minutes?|hours?|days?|months?|years?)\b)?)\b\s*\z/i.freeze