zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.2k stars 1.9k forks source link

(Bug report) Inherited attributes not populated for ETAPI #3989

Closed mm21 closed 1 year ago

mm21 commented 1 year ago

Trilium Version

v0.60.1-beta

What operating system are you using?

Ubuntu

What is your setup?

Server access only

Operating System Version

Ubuntu 22.04 LTS

Description

For ETAPI path /notes/:noteId (getNoteById), inherited attributes are not populated unless the note also has an owned attribute. A simple workaround is to create a dummy owned attribute and immediately delete it; then inherited attributes will be populated.

Steps to reproduce:

  1. Create an inheritable attribute for a given note (say root)
  2. Create a child note under note
  3. Check attributes of child note a. Expect a single inherited attribute but returns no attributes

I'll submit a PR with .http test cases which reproduce this issue along with the mentioned workaround.

Error logs

No response

zadam commented 1 year ago

Hi, thanks for the report, should be now fixed in master.

mm21 commented 1 year ago

Thanks for the quick response! My test case is still failing without the workaround, but it's actually a little more involved than what get-inherited-attribute.http is doing. I'll create another issue for that one.