fix: feeName can be null
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
06b3f1f89c
commit
f0d0a9387d
|
@ -58,9 +58,10 @@ class InsertMemberAction
|
|||
$fee = Fee::nami($member->feeId ?: -1);
|
||||
|
||||
if (is_null($fee)) {
|
||||
$fee = Fee::create(['name' => $member->feeName, 'nami_id' => $member->feeId]);
|
||||
$subscription = $fee->subscriptions()->create(['name' => $member->feeName]);
|
||||
$subscription->children()->create(['name' => $member->feeName, 'amount' => 1000]);
|
||||
$feeName = $member->feeName ?: 'Default';
|
||||
$fee = Fee::create(['name' => $feeName, 'nami_id' => $member->feeId]);
|
||||
$subscription = $fee->subscriptions()->create(['name' => $feeName]);
|
||||
$subscription->children()->create(['name' => $feeName, 'amount' => 1000]);
|
||||
}
|
||||
|
||||
return $fee->subscriptions()->first();
|
||||
|
|
Loading…
Reference in New Issue