Skip to content

Commit 578f886

Browse files
committed
docs: Add comments explaining entity to dictionary conversion logic.
1 parent 4e6f30f commit 578f886

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/knowcode/service.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,11 @@ def get_entity_details(self, entity_id: str) -> Optional[dict[str, Any]]:
144144
if not entity:
145145
return None
146146

147+
# Convert to dictionary (using internal helper or creating one)
148+
# We can reuse the knowledge store's _entity_to_dict if exposed,
149+
# or just construct it manually here to be safe and explicit.
147150
from dataclasses import asdict
151+
148152
return {
149153
"id": entity.id,
150154
"kind": entity.kind.value,

0 commit comments

Comments
 (0)