Added condition to deal with fieldname 'rtd_location' which can be tried to be queried in some places and doesn't exist in database (#7318)

💥 Nice work, Ivan!
This commit is contained in:
Ivan Nieto 2019-07-31 15:54:55 -05:00 committed by snipe
parent 8a1f6b74e8
commit f407b86aa8

View file

@ -1378,7 +1378,7 @@ class Asset extends Depreciable
}
}
if (($fieldname!='category') && ($fieldname!='model_number') && ($fieldname!='location') && ($fieldname!='supplier')
if (($fieldname!='category') && ($fieldname!='model_number') && ($fieldname!='rtd_location') && ($fieldname!='location') && ($fieldname!='supplier')
&& ($fieldname!='status_label') && ($fieldname!='model') && ($fieldname!='company') && ($fieldname!='manufacturer')) {
$query->orWhere('assets.'.$fieldname, 'LIKE', '%' . $search_val . '%');
}