Fix #6255 Backend: Ignore dashboard usage summary in activity feed (#6256)

This commit is contained in:
Vivek Ratnavel Subramanian 2022-07-21 11:38:35 -07:00 committed by GitHub
parent b8f1491b8f
commit fe0f9d88e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,7 +91,8 @@ public class ChangeEventHandler implements EventHandler {
if (Entity.shouldDisplayEntityChangeOnFeed(changeEvent.getEntityType())) { if (Entity.shouldDisplayEntityChangeOnFeed(changeEvent.getEntityType())) {
// ignore usageSummary updates in the feed // ignore usageSummary updates in the feed
boolean shouldIgnore = false; boolean shouldIgnore = false;
if (Entity.TABLE.equals(changeEvent.getEntityType()) && changeEvent.getChangeDescription() != null) { if (List.of(Entity.TABLE, Entity.DASHBOARD).contains(changeEvent.getEntityType())
&& changeEvent.getChangeDescription() != null) {
List<FieldChange> fields = changeEvent.getChangeDescription().getFieldsUpdated(); List<FieldChange> fields = changeEvent.getChangeDescription().getFieldsUpdated();
shouldIgnore = fields.stream().anyMatch(field -> field.getName().equals("usageSummary")); shouldIgnore = fields.stream().anyMatch(field -> field.getName().equals("usageSummary"));
} }