entity: fix error when requesting the root entity

This commit is contained in:
Benjamin Dauvergne 2013-01-28 22:20:56 +01:00
parent c4fddbaca3
commit 3ce87716ec
1 changed files with 2 additions and 2 deletions

View File

@ -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,
)