Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: double release file (#16148)

p0ny82bc27cfa691
diff --git a/backend/api/v1/release_service.go b/backend/api/v1/release_service.go
index 34d3410f5c..96c3caee57 100644
--- a/backend/api/v1/release_service.go
+++ b/backend/api/v1/release_service.go
@@ -459,9 +459,12 @@ func validateAndSanitizeReleaseFiles(files []*v1pb.Release_File) ([]*v1pb.Releas
}
return 1
})
- for _, fv := range filesWithVersions {
- files = append(files, fv.file)
- }
- return files, nil
+ return slices.Collect(func(yield func(*v1pb.Release_File) bool) {
+ for _, f := range filesWithVersions {
+ if !yield(f.file) {
+ return
+ }
+ }
+ }), nil
}