dscf-core 0.3.13 → 0.3.14

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: 1017e5f24b7c9e2082e34887e79c5f1f1efe0702aa9be9d51fe7e30f82f26975
4
- data.tar.gz: f6f878a9c7dc8df5fd0823cf885a0a88366d0a2b08cdcbcb64898607d7701a50
3
+ metadata.gz: 04dc0626657988f601694e4e423b72fbc82996d6960178bc52024aa1de41bfe8
4
+ data.tar.gz: 9270c931ab649cf64b2265e0680ea36cdea14c85cb7d73439e66035a4336bae1
5
5
  SHA512:
6
- metadata.gz: 38ef2bbb5e8ac7e0236e5dea4642350f82518c4b0bf3fcc4ae9f192512c4d5de656894c0c1406707110f3a6b819f9f217290ae0211950c87cccfc03ac58c5170
7
- data.tar.gz: bf59dfc24369e0873ead51b1723dd6f14d76ccfe6aa1624e5d93740537090331e7cf9e11cf16f2a7cb4180a754e392104175fe29ece94bb7ff80230447e00ae8
6
+ metadata.gz: 369e0eb673118c48fafb0c41ab308a926cda01ba05348047db3907fa988ca569185c9f5c899f9a5d560ed728271b2bc273baed41abe2a62695eca5171d52ef88
7
+ data.tar.gz: fa2cc032c4fb2ce73478517a353896dd03dc36717a05839b8fde475308d41215d0b396cde8aa935a1fed48ffe9b5b437909c067a5548434d048fed3ce808fbd0
@@ -161,8 +161,12 @@ module Dscf
161
161
  # agent from it rather than trusting a client-supplied agent_id
162
162
  # (there is none in this params shape today, but this keeps the
163
163
  # same trust model as the rest of the agent-assisted flows).
164
- onboarding_agent = if defined?(Dscf::Marketplace::Agent)
165
- Dscf::Marketplace::Agent.find_by(user_id: current_user&.id)
164
+ # Guard on current_user first: find_by(user_id: nil) matches any
165
+ # Agent row with a null user_id, silently attributing anonymous
166
+ # self-signups to a random agent (confirmed live in dscf_marketplace's
167
+ # equivalent bug — same fix applied here).
168
+ onboarding_agent = if current_user && defined?(Dscf::Marketplace::Agent)
169
+ Dscf::Marketplace::Agent.find_by(user_id: current_user.id)
166
170
  end
167
171
 
168
172
  retailer = Dscf::Marketplace::Retailer.create!(
@@ -1,5 +1,5 @@
1
1
  module Dscf
2
2
  module Core
3
- VERSION = "0.3.13".freeze
3
+ VERSION = "0.3.14".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dscf-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.13
4
+ version: 0.3.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Asrat