1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-11 02:13:41 +09:00

Merge pull request #1591 from anytypeio/fix-remove-maxcount-validation-GO-444

[GO-444] Just remove maxCount validation for String value
This commit is contained in:
Sergey Malenkov 2022-10-28 17:42:13 +05:00 committed by GitHub
commit 78772c38c3
Signed by: github
GPG key ID: 4AEE18F83AFDEB23

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) {