huginn_acumen_product_agent 1.5.1 → 1.5.2

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: 96b074d16608b20299c0c1bd7292bd060c28bef20290938b240cf96b15543d2d
4
- data.tar.gz: 1bbaabd459e91d72240568816d9c4df03c7fb6dfee73f2adedaa01dbe2df2c47
3
+ metadata.gz: 7dde4939a6f527acdc57c3cca3b489046521b4f9220e369d76424da6a34e18e5
4
+ data.tar.gz: dce7f773ea6ff04bf58a98816d6d7f1624e56148c722ee694488c06a10cd84a9
5
5
  SHA512:
6
- metadata.gz: 04cd9b20490eefafff31faa38afc4500a90f54d9cf53f2acf33181d652657b5fe90ef7a60ed6c21c5f58451aa7a27ec9e7bb606ee7cdfcfe81fe64294ff08e74
7
- data.tar.gz: 35688020d94feb470257944770b2bd8b9d22334e1a67a70da12b41e26a962abc8bcd3f594c659901b6068afbd8a8aa05242f4bbce57a105f2d4e83fb028f7e04
6
+ metadata.gz: b665673955979aebd6a03fae4f240a40eb4ae4623103ee208bbcaf5ed5b220cc5619584bb0531b5cf8981c5cf2aa304907ab53bbcc402507689d38cb3064137b
7
+ data.tar.gz: 76435c4a56a302ff36d193ca3e8cb1c42a6ab862e2536b1e31f9b3272826ef25f929450f369f59c5cb66becd189501754b7045e78e32782c8a5bdefe9a4dacba
@@ -20,7 +20,16 @@ module AcumenProductQueryConcern
20
20
 
21
21
  def get_variants_for_ids(acumen_client, ids)
22
22
  result = get_linked_products_by_ids(acumen_client, ids)
23
- result.select { |link| link['alt_format'].to_s != 0.to_s }
23
+
24
+ # Filtering out duplicate links getting sent from acumen
25
+ filter = []
26
+ result.each do |link|
27
+ if (link['alt_format'].to_s != 0.to_s && !link.in?(filter))
28
+ filter.push(link)
29
+ end
30
+ end
31
+
32
+ return filter
24
33
  end
25
34
 
26
35
  def get_linked_products_by_ids(acumen_client, ids)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: huginn_acumen_product_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Spizziri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-15 00:00:00.000000000 Z
11
+ date: 2020-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler