Skip to content

Commit

Permalink
🎨 Update db table view
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Oct 23, 2023
1 parent b258c13 commit 91e6cd4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions kernel/model/attribute_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,13 @@ func RenderAttributeView(avID string) (viewable av.Viewable, attrView *av.Attrib
}

if 1 > len(attrView.Views) {
err = av.ErrViewNotFound
return
view := av.NewView()
attrView.Views = append(attrView.Views, view)
attrView.ViewID = view.ID
if err = av.SaveAttributeView(attrView); nil != err {
logging.LogErrorf("save attribute view [%s] failed: %s", avID, err)
return
}
}

var view *av.View
Expand Down

0 comments on commit 91e6cd4

Please sign in to comment.