Skip to content

Commit 86d80c6

Browse files
authored
Merge pull request #8062 from bakaphp/hotfix/affiliate-link
Hotfix/affiliate link
2 parents 4292822 + 6e1d81f commit 86d80c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/GraphQL/Souk/Queries/Payments/WalletManagementQuery.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ public function getUserWalletBalance(mixed $root, array $args, GraphQLContext $c
5050
$userId = $args['userId'] ?? null;
5151
$user = auth()->user();
5252

53-
if ($user->isAdmin() && $userId !== $user->getId()) {
53+
if ($user->isAdmin() && $userId !== null && $userId !== $user->getId()) {
5454
$user = $user->getById($userId);
5555
}
5656

5757
if (! $user->hasWallet($tag) && $tag !== 'default') {
5858
throw new ModelNotFoundException(
59-
'Wallet not found for the given tag.',
59+
'Wallet not found for the given tag.'
6060
);
6161
}
6262

0 commit comments

Comments
 (0)