mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 22:07:29 -08:00
Merge pull request #10009 from inietov/fixes/blank_results_for_non_superadmins
Fixes #9985. Error 500 when using the asset search - blank results for non super-admins
This commit is contained in:
commit
a02534b6c8
|
@ -78,7 +78,7 @@ final class Company extends SnipeModel
|
|||
$company_id = null;
|
||||
}
|
||||
|
||||
$table = ($table_name) ? $table_name."." : '';
|
||||
$table = ($table_name) ? $table_name."." : $query->getModel()->getTable().".";
|
||||
|
||||
if(\Schema::hasColumn($query->getModel()->getTable(), $column)){
|
||||
return $query->where($table.$column, '=', $company_id);
|
||||
|
|
Loading…
Reference in a new issue