foreman-tasks 3.0.4 → 3.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '09cfa50efbe1f8e34246268b386aa7f2cdc0e6f723beda8aedf60a6edf372cbb'
4
- data.tar.gz: 6124d140e2ddd581ff85c7d4c44bb6c3fed01a9e64050e39bf595bff485ca7bb
3
+ metadata.gz: 8e389326a8086026cc0359932b9d3a3c0c13621f9f0cb60e682d785ecbacddcc
4
+ data.tar.gz: '0880da8a4cd833615fe5aa9b79aab13a5dcf1df0f84aea891a2490c6f7a342ba'
5
5
  SHA512:
6
- metadata.gz: 5ee3cd1aee581db4ab76b9278624d00b28271965655cc9c154d2cd18ac3d9284244886d74bd6f6654847d5ae19f9dc8245eb517227ee1b4c8b88281066f43a19
7
- data.tar.gz: 67c6b3edfd673e60489884f2dbb18fec2a03c7a2a33a04933f1a087686c2b18324038ca2f283a3c07608cae8d335b1f4e441ceffa92dad094468a3ac77cccaaa
6
+ metadata.gz: 15589c91365b2f7f0f14b38d000575048c2c9e316430eb1564357fd7aee02b9af275155e7021cc69bffc55e8eb46d83445554a46f615d703d6e5da52912a4a94
7
+ data.tar.gz: b5083cad3c0268b6c461574f7f9c86887bb395a85ec6cd41dd15d2816c07961bee099fc5e4d926029c1e57802c41852a4768c5c68674d26a8822e900ef879b59
@@ -21,6 +21,7 @@ module ForemanTasks
21
21
  SQL
22
22
  # Select only those tasks which either have the correct taxonomy or are not related to any
23
23
  sql = "foreman_tasks_locks_taxonomy#{uniq_suffix}.resource_id #{operator} (?) OR foreman_tasks_locks_taxonomy#{uniq_suffix}.resource_id IS NULL"
24
+ value = value.split(',') if operator.index(/IN/i)
24
25
  { :conditions => sanitize_sql_for_conditions([sql, value]), :joins => joins }
25
26
  end
26
27
 
@@ -1,3 +1,3 @@
1
1
  module ForemanTasks
2
- VERSION = '3.0.4'.freeze
2
+ VERSION = '3.0.5'.freeze
3
3
  end
@@ -134,6 +134,8 @@ class TasksTest < ActiveSupport::TestCase
134
134
  test 'can search by taxonomies using IN' do
135
135
  assert_nothing_raised(PG::SyntaxError) { ForemanTasks::Task.search_for('location_id ^ (1)').first }
136
136
  assert_nothing_raised(PG::SyntaxError) { ForemanTasks::Task.search_for('organization_id ^ (1)').first }
137
+ assert_nothing_raised(PG::SyntaxError) { ForemanTasks::Task.search_for('location_id ^ (1,2)').first }
138
+ assert_nothing_raised(PG::SyntaxError) { ForemanTasks::Task.search_for('organization_id ^ (1,2)').first }
137
139
  assert_nothing_raised(PG::SyntaxError) { ForemanTasks::Task.search_for('organization_id = 1').first }
138
140
  end
139
141
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.4
4
+ version: 3.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-19 00:00:00.000000000 Z
11
+ date: 2021-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dynflow