private accessor
This commit is contained in:
parent
00fe19083b
commit
274ce57f5b
@ -45,7 +45,7 @@ func (dma *AbstractAccessor) SetLogger(t DataType) {
|
||||
|
||||
func (wfa *AbstractAccessor) GenericStoreOne(data DBObject, accessor Accessor) (DBObject, int, error) {
|
||||
data.GenerateID()
|
||||
if cursor, _, _ := accessor.Search(data.GetName(), "abstractresource.abstractobject.name", "abstractobject.name"); len(cursor) > 0 {
|
||||
if cursor, _, _ := accessor.Search(data.GetName(), []string{"abstractresource.abstractobject.name", "abstractobject.name"}...); len(cursor) > 0 {
|
||||
return nil, 409, errors.New(accessor.GetType() + " with name " + data.GetName() + " already exists")
|
||||
}
|
||||
err := validate.Struct(data)
|
||||
|
Loading…
Reference in New Issue
Block a user