apidae 1.4.22 → 1.4.23

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: 06113d4be79039fd53e87ec4f7402a9be0b8cff40a65b56ac5ef7534387f15f7
4
- data.tar.gz: cea92c0178c6777b373fe354c55140bd77d74cfdf02dd5a91e85eee50ba06d78
3
+ metadata.gz: 25915d76b489457d5f8742026e8e20066d07847cf25deb9cf7bcf91923b57f5a
4
+ data.tar.gz: 96cd987d844341b96dfbb50cf8c930b102a9f089e07ff954f03f41dd70655298
5
5
  SHA512:
6
- metadata.gz: ea5118707d30614e8f151a25f334081b895e86814d65a2f0408130086c0e8bbb15136ad4c6c08692baa6f3fab9ebbfa1203cbedd8c42d7da1a9a49b7525164ac
7
- data.tar.gz: f4b8b035cf728b140863bbf46d5757272aff0411598a77aec2f69e964167fbb64b2733a42c6712a9c2574b32a414da50b48ab075d069b6df57236949187f655c
6
+ metadata.gz: a3735ee05bdf9b60238a30d2a8a62e0281e51aa531da1b7bfea528bac560b3f4b709fc76f015ae3ee72438848e9689b75ac7958d7868591240236d829a9c08f9
7
+ data.tar.gz: 2aca45e0611f334c047285059953a952d1f7fae27e81260376373fb9df5392477c6859628f04ab8e2ab7cbc6a42e96881d3c5909d0570efaf387a2c8730e315c
@@ -123,7 +123,7 @@ module Apidae
123
123
  # Note : WARNING - updated objs will only contain the provided fields
124
124
  def add_or_refresh_objs(fields = ["@all"])
125
125
  if valid_api?
126
- res = api_objects({fields: fields, locales: apidae_project&.locales.blank? ? [DEFAULT_LOCALE] : apidae_project.locales})
126
+ res = api_objects({fields: fields})
127
127
  if res[:results] && res[:results].length > 0
128
128
  res[:results].each do |result|
129
129
  obj_data = result.deep_symbolize_keys
@@ -264,7 +264,7 @@ module Apidae
264
264
  first: opts[:first] || 0,
265
265
  count: opts[:count] || MAX_COUNT,
266
266
  selectionIds: opts[:selection_ids],
267
- locales: opts[:locales].blank? ? [DEFAULT_LOCALE] : opts[:locales],
267
+ locales: opts[:locales] || (apidae_project&.locales.blank? ? [DEFAULT_LOCALE] : apidae_project.locales),
268
268
  identifiants: opts[:obj_ids],
269
269
  dateDebut: opts[:from],
270
270
  dateFin: opts[:to],
@@ -1,3 +1,3 @@
1
1
  module Apidae
2
- VERSION = "1.4.22"
2
+ VERSION = "1.4.23"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apidae
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.22
4
+ version: 1.4.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Baptiste Vilain