mirror of
https://github.com/anyproto/anytype-heart.git
synced 2025-06-10 18:10:49 +09:00
objectType create remove name empty check
This commit is contained in:
parent
5ba07f804c
commit
b30b32a1a1
2 changed files with 1 additions and 4 deletions
|
@ -52,6 +52,7 @@ func (p *Set) Init(ctx *smartblock.InitContext) (err error) {
|
|||
templates := []template.StateTransformer{
|
||||
template.WithDataviewRelationMigrationRelation(template.DataviewBlockId, bundle.TypeKeyBookmark.URL(), bundle.RelationKeyUrl, bundle.RelationKeySource),
|
||||
template.WithObjectTypesAndLayout([]string{bundle.TypeKeySet.URL()}, model.ObjectType_set),
|
||||
template.WithForcedDetail(bundle.RelationKeyLayout, pbtypes.Float64(float64(model.ObjectType_set))),
|
||||
template.WithForcedDetail(bundle.RelationKeyFeaturedRelations, pbtypes.StringList(featuredRelations)),
|
||||
template.WithDescription,
|
||||
template.WithFeaturedRelations,
|
||||
|
|
|
@ -603,10 +603,6 @@ func (w *Workspaces) createObjectType(st *state.State, details *types.Struct) (i
|
|||
return "", nil, fmt.Errorf("create object type: no data")
|
||||
}
|
||||
|
||||
if pbtypes.GetString(details, bundle.RelationKeyName.String()) == "" {
|
||||
return "", nil, fmt.Errorf("name is empty")
|
||||
}
|
||||
|
||||
var recommendedRelationIds []string
|
||||
for _, relId := range pbtypes.GetStringList(details, bundle.RelationKeyRecommendedRelations.String()) {
|
||||
relKey := strings.TrimPrefix(relId, addr.BundledRelationURLPrefix)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue