MINOR - Suggested patches should have ChangeSource Suggested (#20323)

This commit is contained in:
Pere Miquel Brull 2025-03-19 10:54:00 +01:00 committed by GitHub
parent 76c92d8498
commit 0f714f21a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -34,6 +34,7 @@ import org.openmetadata.schema.type.MetadataOperation;
import org.openmetadata.schema.type.SuggestionStatus;
import org.openmetadata.schema.type.SuggestionType;
import org.openmetadata.schema.type.TagLabel;
import org.openmetadata.schema.type.change.ChangeSource;
import org.openmetadata.sdk.exception.SuggestionException;
import org.openmetadata.service.Entity;
import org.openmetadata.service.ResourceRegistry;
@ -330,7 +331,7 @@ public class SuggestionRepository {
securityContext,
operationContext,
new ResourceContext<>(repository.getEntityType(), entity.getId(), null));
repository.patch(null, entity.getId(), user, patch);
repository.patch(null, entity.getId(), user, patch, ChangeSource.SUGGESTED);
// Only mark the suggestions as accepted after the entity has been successfully updated
for (Suggestion suggestion : suggestions) {