global-registry-bindings 0.8.2 → 0.8.3
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 54da04b391e5887934a2742b3ce27bb8c05332bda16abac5b4ab21b1397b2df8
|
|
4
|
+
data.tar.gz: 98d7ae8c9c4ca502d825f5f0c7a561f3b39c823300a001e6210312a8d36e5346
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 46574b7d39affd391dc650429ff1a8586a209a0e336eff84bcb6ca4c53dc1f3bba08addeee5e2fd939814a3be4a14f3228928c2a107f6dcf2e509bd8747195cf
|
|
7
|
+
data.tar.gz: 10d8d22650b26da903aae867a3f6b17591e901949a315fae1827e5caa7838edcae47a2e4ca1fc6783ebc4eb9e0e6ee62487d4b6e81c85c14e0555b8793a5123e
|
|
@@ -20,7 +20,12 @@ module GlobalRegistry # :nodoc:
|
|
|
20
20
|
"GR entity #{global_registry_entity.id_value} for #{model.class.name}(#{model.id}) has no mdm id; " \
|
|
21
21
|
"will retry"
|
|
22
22
|
end
|
|
23
|
-
|
|
23
|
+
mdm_id_column = global_registry_entity.mdm_id_column
|
|
24
|
+
# Skip the write when the MDM id is unchanged. update_column always issues an
|
|
25
|
+
# UPDATE, so re-pulling an unchanged MDM id churns the row (and downstream
|
|
26
|
+
# replication/WAL consumers) for no reason.
|
|
27
|
+
return if model.send(mdm_id_column) == mdm_entity_id
|
|
28
|
+
model.update_column(mdm_id_column, mdm_entity_id) # rubocop:disable Rails/SkipsModelValidations
|
|
24
29
|
end
|
|
25
30
|
|
|
26
31
|
def dig_global_registry_mdm_id_from_entity(entity, type)
|