...
|
...
|
@@ -35,7 +35,7 @@ func TemplateAdd(uid, companyId int64, request *protocol.TemplateAddRequest) (rs |
|
|
return
|
|
|
}
|
|
|
if _, err = models.GetAuditTemplateByName(companyId, request.Template.Name); err == nil {
|
|
|
err = protocol.NewErrWithMessage("10271")
|
|
|
err = protocol.NewErrWithMessage("10279")
|
|
|
return
|
|
|
}
|
|
|
orm := orm2.NewOrm()
|
...
|
...
|
@@ -164,7 +164,7 @@ func TemplateUpdate(uid, companyId int64, request *protocol.TemplateUpdateReques |
|
|
}
|
|
|
if template.Name != request.Template.Name {
|
|
|
if _, err = models.GetAuditTemplateByName(companyId, request.Template.Name); err == nil {
|
|
|
err = protocol.NewErrWithMessage("10271")
|
|
|
err = protocol.NewErrWithMessage("10279")
|
|
|
return
|
|
|
}
|
|
|
}
|
...
|
...
|
|