diff --git a/kernel/av/filter.go b/kernel/av/filter.go index 7cba746cb..708e848fb 100644 --- a/kernel/av/filter.go +++ b/kernel/av/filter.go @@ -875,21 +875,21 @@ func (filter *ViewFilter) GetAffectValue(key *Key, defaultVal *Value, addingBloc case KeyTypeBlock: switch filter.Operator { case FilterOperatorIsEqual: - ret.Block = &ValueBlock{ID: filter.Value.Block.ID, Content: filter.Value.Block.Content} + ret.Block = &ValueBlock{ID: addingBlockID, Content: filter.Value.Block.Content, Created: ret.CreatedAt, Updated: ret.UpdatedAt} case FilterOperatorIsNotEqual: - ret.Block = &ValueBlock{ID: filter.Value.Block.ID, Content: ""} + ret.Block = &ValueBlock{ID: addingBlockID, Content: "", Created: ret.CreatedAt, Updated: ret.UpdatedAt} case FilterOperatorContains: - ret.Block = &ValueBlock{ID: filter.Value.Block.ID, Content: filter.Value.Block.Content} + ret.Block = &ValueBlock{ID: addingBlockID, Content: filter.Value.Block.Content, Created: ret.CreatedAt, Updated: ret.UpdatedAt} case FilterOperatorDoesNotContain: - ret.Block = &ValueBlock{ID: filter.Value.Block.ID, Content: ""} + ret.Block = &ValueBlock{ID: addingBlockID, Content: "", Created: ret.CreatedAt, Updated: ret.UpdatedAt} case FilterOperatorStartsWith: - ret.Block = &ValueBlock{ID: filter.Value.Block.ID, Content: filter.Value.Block.Content} + ret.Block = &ValueBlock{ID: addingBlockID, Content: filter.Value.Block.Content, Created: ret.CreatedAt, Updated: ret.UpdatedAt} case FilterOperatorEndsWith: - ret.Block = &ValueBlock{ID: filter.Value.Block.ID, Content: filter.Value.Block.Content} + ret.Block = &ValueBlock{ID: addingBlockID, Content: filter.Value.Block.Content, Created: ret.CreatedAt, Updated: ret.UpdatedAt} case FilterOperatorIsEmpty: - ret.Block = &ValueBlock{ID: filter.Value.Block.ID, Content: ""} + ret.Block = &ValueBlock{ID: addingBlockID, Content: "", Created: ret.CreatedAt, Updated: ret.UpdatedAt} case FilterOperatorIsNotEmpty: - ret.Block = &ValueBlock{ID: filter.Value.Block.ID, Content: ""} + ret.Block = &ValueBlock{ID: addingBlockID, Content: "", Created: ret.CreatedAt, Updated: ret.UpdatedAt} } case KeyTypeText: switch filter.Operator {