We hit this if we fail to assign a wallet to a domain that is not
public.
Details
Details
- Reviewers
machniak - Group Reviewers
Restricted Project - Commits
- rK8503657884e4: Handle domains without wallet
Diff Detail
Diff Detail
- Repository
- rK kolab
- Lint
Lint Skipped - Unit
No Test Coverage - Build Status
Buildable 54768 Build 19494: arc lint + arc unit
Event Timeline
| src/app/Http/Controllers/API/V4/UsersController.php | ||
|---|---|---|
| 700 | I assume that the error is here if the domain has no owner, right? Then I would just prevent the error here. $domain->walletOwner()?->id should do the trick. | |
| src/app/Http/Controllers/API/V4/UsersController.php | ||
|---|---|---|
| 700 | Correct, but isn't it kind of an invariant atm. that a domain must be either public or have an owner? We can do the proposed adjustment if you think that's better, I'm just not sure. | |
| src/app/Http/Controllers/API/V4/UsersController.php | ||
|---|---|---|
| 700 | Public domains are available to all users, whether they have an owner or not. Your way we end up with an expensive query doubled, in case of a non-public domain. We could use cached $domain->account, but we don't have to. I'd just do it as I suggested. | |