fix exam checmout error when when user not exists

This commit is contained in:
xiaomlove
2022-06-08 14:47:36 +08:00
parent 09f6e5b274
commit cc68a67d71
2 changed files with 10 additions and 2 deletions

View File

@@ -136,7 +136,8 @@ class HitAndRunRepository extends BaseRepository
$currentLog = "$logPrefix, [HANDLING] " . $row->toJson();
do_log($logPrefix);
if (!$row->user) {
do_log("$currentLog, user not exists, skip!", 'error');
do_log("$currentLog, user not exists, remove it!", 'error');
$row->delete();
continue;
}
if (!$row->snatch) {
@@ -144,7 +145,8 @@ class HitAndRunRepository extends BaseRepository
continue;
}
if (!$row->torrent) {
do_log("$currentLog, torrent not exists, skip!", 'error');
do_log("$currentLog, torrent not exists, remove it!", 'error');
$row->delete();
continue;
}