From 12f9042eabb237167d8fd0190a220b5f238b1908 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Fri, 6 Oct 2023 10:37:34 +0800 Subject: [PATCH] :art: Database column icon https://github.com/siyuan-note/siyuan/issues/9304 --- kernel/model/attribute_view.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index cbf04b63b..63edac6ad 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -903,7 +903,11 @@ func addAttributeViewColumn(operation *Operation) (err error) { keyType := av.KeyType(operation.Typ) switch keyType { case av.KeyTypeText, av.KeyTypeNumber, av.KeyTypeDate, av.KeyTypeSelect, av.KeyTypeMSelect, av.KeyTypeURL, av.KeyTypeEmail, av.KeyTypePhone, av.KeyTypeMAsset, av.KeyTypeTemplate: - key := av.NewKey(operation.ID, operation.Name, operation.Data.(string), keyType) + var icon string + if nil != operation.Data { + icon = operation.Data.(string) + } + key := av.NewKey(operation.ID, operation.Name, icon, keyType) attrView.KeyValues = append(attrView.KeyValues, &av.KeyValues{Key: key}) switch view.LayoutType {