🎨 Improve interaction when deleting two-way relation field in a database https://github.com/siyuan-note/siyuan/issues/11252

This commit is contained in:
Daniel 2024-10-17 16:53:18 +08:00
parent ca330e2557
commit 88e321b2d0
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 42 additions and 37 deletions

View file

@ -277,8 +277,12 @@ func removeAttributeViewKey(c *gin.Context) {
avID := arg["avID"].(string)
keyID := arg["keyID"].(string)
removeRelationDest := false
if nil != arg["removeRelationDest"] {
removeRelationDest = arg["removeRelationDest"].(bool)
}
err := model.RemoveAttributeViewKey(avID, keyID)
err := model.RemoveAttributeViewKey(avID, keyID, removeRelationDest)
if err != nil {
ret.Code = -1
ret.Msg = err.Error()