mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 11:04:41 -04:00
Multi-db fix
This commit is contained in:
parent
04aa4920d0
commit
756fca49fe
@ -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}");
|
||||
|
Loading…
x
Reference in New Issue
Block a user