1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-08 05:47:07 +09:00

GO-5589: Allow modification of bundled but not-readonly relations

This commit is contained in:
Jannis Metrikat 2025-05-19 18:21:20 +02:00
parent b7586c05d9
commit 94d9d231f7
No known key found for this signature in database
GPG key ID: B223CAC5AAF85615

View file

@ -221,7 +221,8 @@ func (s *Service) UpdateProperty(ctx context.Context, spaceId string, propertyId
return apimodel.Property{}, err
}
if bundle.HasRelation(domain.RelationKey(prop.RelationKey)) {
rel, err := bundle.PickRelation(domain.RelationKey(prop.RelationKey))
if err != nil && rel.ReadOnly {
return apimodel.Property{}, ErrPropertyCannotBeUpdated
}