mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -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);
|
$providerId = substr($value, 0, 1);
|
||||||
$oauthId = substr($value, 2);
|
$oauthId = substr($value, 2);
|
||||||
$isFound = $entity::where('oauth_provider_id', '=', $providerId)
|
$isFound = $entity::where('oauth_provider_id', '=', $providerId)
|
||||||
->where('oauth_user_id', '=', $oauthId)->first();
|
->where('oauth_user_id', '=', $oauthId)
|
||||||
|
->withTrashed()
|
||||||
|
->first();
|
||||||
} else {
|
} else {
|
||||||
$isFound = $entity::where($field, '=', $value)->first();
|
$isFound = $entity::where($field, '=', $value)
|
||||||
|
->withTrashed()
|
||||||
|
->first();
|
||||||
}
|
}
|
||||||
if (! $isFound) {
|
if (! $isFound) {
|
||||||
abort("Looked up {$className} not found: {$field} => {$value}");
|
abort("Looked up {$className} not found: {$field} => {$value}");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user