spree_core 5.0.7 → 5.0.8

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: c87f4abd941d499270077f37fb1f2e7d3905796e81bdebba35cb20f66349cdb0
4
- data.tar.gz: 33286e4357f7051a22ef1bfe56dcd1292f1931beb0cff4bb02396db79568b85f
3
+ metadata.gz: '08db9a670e64896f6ffdc359cd7ba3108bc4a2ac6c08bcbfc1b3d0a41d7d30dd'
4
+ data.tar.gz: 3d57ecdbf87aad645f73a16fc9b092256fe29960827b8366268b6609b707c5b9
5
5
  SHA512:
6
- metadata.gz: f8dd54b9b45f81dac694b61c8fc6520c9a26c4b995637413dc195552e8e5931ac57c236af3a4f5ccf3100fdf18ac97a84eecbb2b261dd250a7452572ae2fbd9a
7
- data.tar.gz: 9db37625c009f49a5d1e4a6c5d7207f9a4dda570f3f33fd01abdb2117972138a247b2cc0ff37b4f9350b3d3e863d82103fd864eeb672190baba6de05d3e58c1d
6
+ metadata.gz: 1479ca3130cde4b9b0c4b22729fa8e90b0e59b3bbfdc6bd7e1ea05693a230641061ce8daa0206ca2ef1cdaf6f1a3aa326cde1004f52384633ca360060b9aaae1
7
+ data.tar.gz: 265568f55c8e7632630698fa2921a6880f5a53e533a0d13ef75d3edf1a55969d77f2ea1d1e7675b0f02996e0d0842c3768bc84183277939bd7c5dde837064049
@@ -14,13 +14,17 @@ module Spree
14
14
  end
15
15
 
16
16
  def bill_address_id=(id)
17
+ return if bill_address_id == id
18
+
17
19
  address = Spree::Address.find_by(id: id)
18
- if address && address.user_id == user_id
20
+ # rubocop:disable Style/ConditionalAssignment
21
+ if address && user_id.present? && address.user_id == user_id
19
22
  self['bill_address_id'] = address.id
20
- bill_address.reload
21
23
  else
22
24
  self['bill_address_id'] = nil
23
25
  end
26
+ # rubocop:enable Style/ConditionalAssignment
27
+ reset_bill_address
24
28
  end
25
29
 
26
30
  def bill_address_attributes=(attributes)
@@ -29,13 +33,17 @@ module Spree
29
33
  end
30
34
 
31
35
  def ship_address_id=(id)
36
+ return if ship_address_id == id
37
+
32
38
  address = Spree::Address.find_by(id: id)
33
- if address && address.user_id == user_id
39
+ # rubocop:disable Style/ConditionalAssignment
40
+ if address && user_id.present? && address.user_id == user_id
34
41
  self['ship_address_id'] = address.id
35
- ship_address.reload
36
42
  else
37
43
  self['ship_address_id'] = nil
38
44
  end
45
+ # rubocop:enable Style/ConditionalAssignment
46
+ reset_ship_address
39
47
  end
40
48
 
41
49
  def ship_address_attributes=(attributes)
@@ -1,5 +1,5 @@
1
1
  module Spree
2
- VERSION = '5.0.7'.freeze
2
+ VERSION = '5.0.8'.freeze
3
3
 
4
4
  def self.version
5
5
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.7
4
+ version: 5.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2026-01-08 00:00:00.000000000 Z
13
+ date: 2026-02-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: i18n-tasks
@@ -1312,9 +1312,9 @@ licenses:
1312
1312
  - BSD-3-Clause
1313
1313
  metadata:
1314
1314
  bug_tracker_uri: https://github.com/spree/spree/issues
1315
- changelog_uri: https://github.com/spree/spree/releases/tag/v5.0.7
1315
+ changelog_uri: https://github.com/spree/spree/releases/tag/v5.0.8
1316
1316
  documentation_uri: https://docs.spreecommerce.org/
1317
- source_code_uri: https://github.com/spree/spree/tree/v5.0.7
1317
+ source_code_uri: https://github.com/spree/spree/tree/v5.0.8
1318
1318
  post_install_message:
1319
1319
  rdoc_options: []
1320
1320
  require_paths: