1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-07 21:37:04 +09:00
This commit is contained in:
kirillston 2025-06-06 19:35:57 +02:00
parent 8cc1320f3e
commit 0a4097290a
No known key found for this signature in database
GPG key ID: BE4BF014F0ECDFE8

View file

@ -116,7 +116,7 @@ func (s *service) createObjectInSpace(
}
details = internalflag.PutToDetails(details, req.InternalFlags)
if t, _ := bundle.GetType(req.ObjectTypeKey); t != nil && t.RestrictObjectCreation && req.ObjectTypeKey != bundle.TypeKeyTemplate {
if t, e := bundle.GetType(req.ObjectTypeKey); e == nil && t.RestrictObjectCreation && req.ObjectTypeKey != bundle.TypeKeyTemplate {
return "", nil, errors.Wrap(restriction.ErrRestricted, "creation of this object type is restricted")
}