|
|
@ -181,10 +181,11 @@ async function edit (ctx) { |
|
|
|
if (pushId) { |
|
|
|
repeatOption.where.id = { $ne: pushId } |
|
|
|
} |
|
|
|
if (repeatOption) { |
|
|
|
let repeatRes = await models.findOne(repeatOption) |
|
|
|
if (repeatRes) { |
|
|
|
throw `已有名称为[${name}]的同名策略` |
|
|
|
} |
|
|
|
let repeatRes = await models.findOne(repeatOption) |
|
|
|
|
|
|
|
if (pushId) { |
|
|
|
await models.AlarmPushConfig.update(storageData, { |
|
|
|
where: { |
|
|
|