Fix assignee filter bug in List

This commit is contained in:
2026-03-29 18:58:34 +02:00
parent 9e8c37564f
commit 13b4c4b651
22 changed files with 939 additions and 555 deletions

View File

@@ -34,13 +34,17 @@ func (db *DB) GetIncomingRels(id string, r models.RelType) ([]string, error) {
}
func (db *DB) GetRelNames(n *models.Node, r models.RelType) ([]string, error) {
result := make([]string, 0, len(n.Relations[string(r)]))
for _, id := range n.Relations[string(r)] {
node, err := db.NodeByID(id)
if err != nil {
ids := n.Relations[string(r)]
if len(ids) == 0 {
return nil, nil
}
result := make([]string, 0, len(ids))
for _, id := range ids {
var title string
if err := db.QueryRow("SELECT title FROM nodes WHERE id = ?", id).Scan(&title); err != nil {
return nil, err
}
result = append(result, node.Title)
result = append(result, title)
}
return result, nil
}