entity: fix error when requesting the root entity
This commit is contained in:
parent
c4fddbaca3
commit
3ce87716ec
|
@ -13,8 +13,8 @@ def entity2json(entity):
|
|||
code=entity.code,
|
||||
name=entity.get_name().strip().title(),
|
||||
description=entity.get_description(),
|
||||
is_leaf = entity.right_bound == entity.left_bound + 1,
|
||||
parent_id=entity.parent.id,
|
||||
is_leaf=entity.right_bound == entity.left_bound + 1,
|
||||
parent_id=entity.parent_id,
|
||||
type=entity.entity_type.name,
|
||||
)
|
||||
|
||||
|
|
Reference in New Issue