zuora_connect 2.0.60j → 2.0.60k
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 +4 -4
- data/app/models/zuora_connect/app_instance_base.rb +16 -2
- data/lib/zuora_connect/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe61d354796bd1cf1935f2787db0611bb2858393767db78230efb191cf64eabc
|
4
|
+
data.tar.gz: c5b22daf266f3cc696c1a85ac46e7b4242d75a59f094f2103edb1fa0da729df2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04b0bf5d380361c58279910595d0967fde34c00b05db703d2c4dda02a8205487eb8b0fd3c8bfc44d0c0997854cfacca9585c778e96000e938a19b8ee6604271c
|
7
|
+
data.tar.gz: 510d4eb2cd734f1082f887ff3924ce580658d4419929ee12db35acec17338785b8e9ecb64588307f3a6fe26adb29a8ed45c04df51a2964f1be9480880c2f2813
|
@@ -241,8 +241,22 @@ module ZuoraConnect
|
|
241
241
|
ZuoraConnect.logger.error(ex) if !IGNORED_LOCALS.include?(ex.locale.to_s.downcase)
|
242
242
|
end
|
243
243
|
|
244
|
-
|
245
|
-
|
244
|
+
begin
|
245
|
+
sql = <<-eos
|
246
|
+
SELECT zuora_users.zuora_identity_response
|
247
|
+
FROM "#{self.id}".zuora_users
|
248
|
+
ORDER BY zuora_users.updated_at DESC
|
249
|
+
LIMIT 1;
|
250
|
+
eos
|
251
|
+
user = ActiveRecord::Base.connection.execute(sql).to_a.first
|
252
|
+
|
253
|
+
if user.present?
|
254
|
+
zuora_identity_response = JSON.parse(user.fetch('zuora_identity_response', '{}'))
|
255
|
+
self.user_timezone = zuora_identity_response.values.first&.dig('timeZone')
|
256
|
+
end
|
257
|
+
rescue => ex
|
258
|
+
Rails.logger.error('Failed to get users while setting app instance timezone', ex)
|
259
|
+
end
|
246
260
|
|
247
261
|
if self.user_timezone.present?
|
248
262
|
# connect instance which has a custom timezone
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zuora_connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.60k
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Connect Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apartment
|