优化界面
This commit is contained in:
@@ -455,7 +455,11 @@ router.put('/api/models/:model_id', upload.single('measurement_file'), async (re
|
||||
|
||||
if (newBrandName !== dbModel.brand_name || newName !== dbModel.name) {
|
||||
const existing = await Model.findOne({
|
||||
where: { brand_name: newBrandName, name: newName },
|
||||
where: {
|
||||
brand_name: newBrandName,
|
||||
name: newName,
|
||||
id: { [Op.ne]: modelId },
|
||||
},
|
||||
});
|
||||
if (existing) {
|
||||
logger.warn(`Model already exists: brand_name=${newBrandName}, name=${newName}`);
|
||||
|
||||
Reference in New Issue
Block a user