🎨 Add Relation column to database table view https://github.com/siyuan-note/siyuan/issues/9888

This commit is contained in:
Daniel
2023-12-24 09:55:12 +08:00
parent 356b6748c9
commit 9d72566876
2 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -865,7 +865,7 @@ func updateAttributeViewColRelation(operation *Operation) (err error) {
for _, v := range destAv.Views {
switch v.LayoutType {
case av.LayoutTypeTable:
v.Table.Columns = append(v.Table.Columns, &av.ViewTableColumn{ID: operation.KeyID})
v.Table.Columns = append(v.Table.Columns, &av.ViewTableColumn{ID: operation.BackRelationKeyID})
}
}
}
+3 -4
View File
@@ -600,10 +600,9 @@ func renderAttributeViewTable(attrView *av.AttributeView, view *av.View) (ret *a
// 组装列
for _, col := range view.Table.Columns {
key, getErr := attrView.GetKey(col.ID)
if nil != getErr {
err = getErr
return
key, _ := attrView.GetKey(col.ID)
if nil == key {
continue
}
ret.Columns = append(ret.Columns, &av.TableColumn{