diff --git a/app/Models/LookupModel.php b/app/Models/LookupModel.php index a137d75fcce5..1e406191628b 100644 --- a/app/Models/LookupModel.php +++ b/app/Models/LookupModel.php @@ -87,9 +87,13 @@ class LookupModel extends Eloquent $providerId = substr($value, 0, 1); $oauthId = substr($value, 2); $isFound = $entity::where('oauth_provider_id', '=', $providerId) - ->where('oauth_user_id', '=', $oauthId)->first(); + ->where('oauth_user_id', '=', $oauthId) + ->withTrashed() + ->first(); } else { - $isFound = $entity::where($field, '=', $value)->first(); + $isFound = $entity::where($field, '=', $value) + ->withTrashed() + ->first(); } if (! $isFound) { abort("Looked up {$className} not found: {$field} => {$value}");