1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-10 18:10:49 +09:00

[GO-444] Just remove maxCount validation for String value

This commit is contained in:
Sergey 2022-10-28 17:28:34 +05:00
parent 620fc8bea6
commit 3ef3c39daa
No known key found for this signature in database
GPG key ID: 2B848483FF11C82C

View file

@ -316,9 +316,6 @@ func (s *service) ValidateFormat(key string, v *types.Value) error {
case model.RelationFormat_file, model.RelationFormat_object:
switch s := v.Kind.(type) {
case *types.Value_StringValue:
if r.MaxCount != 1 {
return fmt.Errorf("incorrect type: %T instead of list(maxCount!=1)", v.Kind)
}
return nil
case *types.Value_ListValue:
if r.MaxCount > 0 && len(s.ListValue.Values) > int(r.MaxCount) {