mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 Improve database field default filling https://github.com/siyuan-note/siyuan/issues/11966
This commit is contained in:
parent
f1bf15146a
commit
46f81b93ed
1 changed files with 8 additions and 8 deletions
|
|
@ -875,21 +875,21 @@ func (filter *ViewFilter) GetAffectValue(key *Key, defaultVal *Value, addingBloc
|
||||||
case KeyTypeBlock:
|
case KeyTypeBlock:
|
||||||
switch filter.Operator {
|
switch filter.Operator {
|
||||||
case FilterOperatorIsEqual:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
case KeyTypeText:
|
||||||
switch filter.Operator {
|
switch filter.Operator {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue