fix details user not exists

This commit is contained in:
xiaomlove
2022-03-14 12:10:54 +08:00
parent 24a2af151e
commit 8b721ac825

View File

@@ -38,7 +38,10 @@ if (!$row) {
) {
permissiondenied();
} else {
$owner = \App\Models\User::query()->with(['valid_medals'])->findOrFail($row['owner']);
$owner = \App\Models\User::query()->with(['valid_medals'])->find($row['owner']);
if (!$owner) {
$owner = \App\Models\User::defaultUser();
}
$torrentRep = new \App\Repositories\TorrentRepository();
$torrentUpdate = [];
if (!empty($_GET["hit"])) {