Merge pull request #1087 from trheyi/main

Update collection validation to ignore empty collection name error
This commit is contained in:
Max 2025-08-05 17:27:33 +08:00 committed by GitHub
commit a7a8a75b1c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -221,8 +221,8 @@ func validateCreateCollectionRequest(req *CreateCollectionRequest) error {
return fmt.Errorf("config is required")
}
// Validate CreateCollectionOptions
if err := req.Config.Validate(); err != nil {
// Validate CreateCollectionOptions (ignore collection name cannot be empty error)
if err := req.Config.Validate(); err != nil && err.Error() != "collection name cannot be empty" {
return fmt.Errorf("invalid config: %w", err)
}