zuora_connect 1.5.306 → 1.5.307
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/zuora_connect/app_instance_base.rb +5 -5
- data/lib/zuora_connect/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bde667f959c487d05ab8154a6057a0e481a7e74
|
4
|
+
data.tar.gz: 1ce968180f77ee0c40ec390b52b555be84af9101
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d138a087d5c1c64ec72ff0c73496d20e9594900b1951100a492aa78a702ea5fc6d36c5c58f44021a8c9b24ae6cc94217953f11d023a1f5e4e6f63be6ea85af3
|
7
|
+
data.tar.gz: 21b5af66b2ba5019d7d3341d6f1a393703422ddbb61f01c7223924871b47ba800a53f53d6aa01cb0c3a6b4fa5219f20c05d30f2e723112a57a46e6bf8f8f7b84
|
@@ -468,7 +468,7 @@ module ZuoraConnect
|
|
468
468
|
raise "Object Id can only be a string or an array of strings"
|
469
469
|
end
|
470
470
|
|
471
|
-
if defined?(Redis.current) && object_id.present? && object_id.class == String
|
471
|
+
if defined?(Redis.current) && object_id.present? && object_id.class == String && object_id.present?
|
472
472
|
stub_catalog = decrypt_data(data: Redis.current.get("Catalog:#{self.id}:#{object_id}:Children:#{child_objects}"))
|
473
473
|
object_hierarchy = decrypt_data(data: Redis.current.get("Catalog:#{self.id}:#{object_id}:Hierarchy"))
|
474
474
|
end
|
@@ -496,7 +496,7 @@ module ZuoraConnect
|
|
496
496
|
"FROM "\
|
497
497
|
"\"public\".\"zuora_connect_app_instances\" "\
|
498
498
|
"WHERE "\
|
499
|
-
"\"id\" = %s" % [entity_reference, object_id, self.id]
|
499
|
+
"\"id\" = %s" % [entity_reference, object_id.blank? ? 'Dummy' : object_id, self.id]
|
500
500
|
elsif object_id.class == Array
|
501
501
|
string =
|
502
502
|
"SELECT "\
|
@@ -529,7 +529,7 @@ module ZuoraConnect
|
|
529
529
|
"FROM "\
|
530
530
|
"\"public\".\"zuora_connect_app_instances\" "\
|
531
531
|
"WHERE "\
|
532
|
-
"\"id\" = %s" % [entity_reference, object_hierarchy['productId'], object_id, self.id]
|
532
|
+
"\"id\" = %s" % [entity_reference, object_hierarchy['productId'], object_id.blank? ? 'Dummy' : object_id, self.id]
|
533
533
|
elsif object_id.class == Array
|
534
534
|
string =
|
535
535
|
"SELECT "\
|
@@ -564,7 +564,7 @@ module ZuoraConnect
|
|
564
564
|
"FROM "\
|
565
565
|
"\"public\".\"zuora_connect_app_instances\" "\
|
566
566
|
"WHERE "\
|
567
|
-
"\"id\" = %s" % [entity_reference, object_hierarchy['productId'], object_hierarchy['productRatePlanId'], object_id, self.id]
|
567
|
+
"\"id\" = %s" % [entity_reference, object_hierarchy['productId'], object_hierarchy['productRatePlanId'], object_id.blank? ? 'Dummy' : object_id , self.id]
|
568
568
|
|
569
569
|
elsif object_id.class == Array
|
570
570
|
string =
|
@@ -586,7 +586,7 @@ module ZuoraConnect
|
|
586
586
|
|
587
587
|
stub_catalog ||= JSON.parse(ActiveRecord::Base.connection.execute(string).first["item"] || "{}")
|
588
588
|
|
589
|
-
if defined?(Redis.current) && object_id.present? && object_id.class == String
|
589
|
+
if defined?(Redis.current) && object_id.present? && object_id.class == String && object_id.present?
|
590
590
|
Redis.current.set("Catalog:#{self.id}:#{object_id}:Hierarchy", encrypt_data(data: object_hierarchy))
|
591
591
|
Redis.current.set("Catalog:#{self.id}:#{object_id}:Children:#{child_objects}", encrypt_data(data: stub_catalog)) if cache
|
592
592
|
end
|