mirror of
https://github.com/steedos/steedos-platform
synced 2024-11-25 18:32:00 +00:00
不能修改此记录的name属性
This commit is contained in:
parent
08bc891736
commit
e053606f4a
@ -204,7 +204,7 @@ Creator.Objects.object_fields =
|
||||
when: "before.update"
|
||||
todo: (userId, doc, fieldNames, modifier, options)->
|
||||
if doc.name == 'name' && modifier?.$set?.name && doc.name != modifier.$set.name
|
||||
throw new Meteor.Error 500, "不能修改此纪录的name属性"
|
||||
throw new Meteor.Error 500, "不能修改此记录的name属性"
|
||||
if modifier?.$set?.name && isRepeatedName(doc, modifier.$set.name)
|
||||
console.log("update fields对象名称不能重复#{doc.name}")
|
||||
throw new Meteor.Error 500, "对象名称不能重复"
|
||||
|
@ -386,7 +386,7 @@ var triggers = {
|
||||
// }
|
||||
|
||||
if (doc.name === 'name' && _.has(modifier.$set, '_name') && doc.name !== modifier.$set._name) {
|
||||
throw new Meteor.Error(500, "不能修改此纪录的name属性");
|
||||
throw new Meteor.Error(500, "不能修改此记录的name属性");
|
||||
}
|
||||
|
||||
if(_.has(modifier.$set, "_name")){
|
||||
|
Loading…
Reference in New Issue
Block a user