IEEE.org     |     IEEE Xplore Digital Library     |     IEEE Standards     |     IEEE Spectrum     |     More Sites

Unverified Commit 334e32fd authored by Edward W's avatar Edward W Committed by GitHub
Browse files

Make sure asset type ID of each row is the same as the asset type ID selected (#74)

parent 7f0de63a
......@@ -344,6 +344,9 @@ const storeCSV = async(assetTypeId, csvJson) => {
if (checkedAsset.length === 0) {
throw 'The selected CSV file contains a row for an asset that is not being tracked (Asset ID '+ assetId + ')';
}
if (checkedAsset[0].asset_type_id != assetTypeId) {
throw 'The selected CSV file contains an asset of a different asset type than the one selected (Asset ID '+ assetId + ')';
}
for (const propertyName in asset) {
if (propertyName !== 'asset_id') {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment