Explicitly cast asset tag to string when querying

This commit is contained in:
Marcus Moore 2023-03-29 11:28:04 -07:00
parent 9cc74caa9e
commit 4cbe683a1a
No known key found for this signature in database

View file

@ -60,7 +60,7 @@ class AssetImporter extends ItemImporter
$asset_tag = Asset::autoincrement_asset();
}
$asset = Asset::where(['asset_tag'=> $asset_tag])->first();
$asset = Asset::where(['asset_tag'=> (string) $asset_tag])->first();
if ($asset) {
if (! $this->updating) {
$this->log('A matching Asset '.$asset_tag.' already exists');