graphiti 1.2.30 → 1.2.31

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 59f45304060e4777562e6cea465b86e2e3ca4725b22e9ab36d19ffbdaf08b888
4
- data.tar.gz: e8e76f9a3cc322ac791ea90d9a201b420813be34b7e0b5ed1e2375add3ff54f8
3
+ metadata.gz: 6c8a84a85ead11c3f8cf69f4e1fb060ea7e9ce6f470b31181214c5f62aa6f847
4
+ data.tar.gz: 52b0574208041cff9168e04e9e0946bbaa856c6dc22b1ea3f425673faffbffd5
5
5
  SHA512:
6
- metadata.gz: 98fbdf37d6d7c7bc1c1ec4c2d406bd7b0f51cf8082c03ca115f351718342f842f0d63140d74babe85298e102da9da46f1de7bc1ee05b1ca3c290ccd9c3d22bd0
7
- data.tar.gz: 6bc39f90b62794a71f593c639babb6ade8a423479cd2065b02cb03ab546692e61cf5f7af8d2f64a7452457c0d0f910da6575f98c141b1858466542c84ba9c870
6
+ metadata.gz: 0ea059b18be0333f2193d024758de5c4a10a0f8f4e4c71d402a1b43e4d3b2f6a3fb9f426d21facf586406178d1e92398ade8f62c3c272adfdbb057623510ee54
7
+ data.tar.gz: 4fb47cd7b6a9397af3660bf1996cdc6f1a33d89d21f2bc67645189665093b0268e46776d1d5871374f7198e9549f15655e5cfc8535ce1a800b6fa4be17462f66
@@ -36,9 +36,12 @@ class Graphiti::Sideload::ManyToMany < Graphiti::Sideload::HasMany
36
36
  self_ref = self
37
37
  fk_type = parent_resource_class.attributes[:id][:type]
38
38
  fk_type = :hash if polymorphic?
39
- resource_class.filter inverse_filter, fk_type do
40
- eq do |scope, value|
41
- self_ref.belongs_to_many_filter(scope, value)
39
+ # Do not recreate if filter already exists
40
+ unless resource_class.config[:filters].has_key?(inverse_filter.to_sym)
41
+ resource_class.filter inverse_filter, fk_type do
42
+ eq do |scope, value|
43
+ self_ref.belongs_to_many_filter(scope, value)
44
+ end
42
45
  end
43
46
  end
44
47
  end
@@ -1,3 +1,3 @@
1
1
  module Graphiti
2
- VERSION = "1.2.30"
2
+ VERSION = "1.2.31"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphiti
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.30
4
+ version: 1.2.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-22 00:00:00.000000000 Z
11
+ date: 2020-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jsonapi-serializable