Commit 99f874ed authored by Yusei Tahara's avatar Yusei Tahara

Use portal_categories.getCategoryValue instead.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37200 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 373e2a27
...@@ -132,6 +132,8 @@ class NodeBudgetVariation(BudgetVariation): ...@@ -132,6 +132,8 @@ class NodeBudgetVariation(BudgetVariation):
if not base_category: if not base_category:
return dict() return dict()
budget_line = budget_cell.getParentValue() budget_line = budget_cell.getParentValue()
portal = self.getPortalObject()
portal_categories = portal.portal_categories
for criterion_category in budget_cell.getMembershipCriterionCategoryList(): for criterion_category in budget_cell.getMembershipCriterionCategoryList():
if '/' not in criterion_category: # safe ... if '/' not in criterion_category: # safe ...
continue continue
...@@ -149,7 +151,7 @@ class NodeBudgetVariation(BudgetVariation): ...@@ -149,7 +151,7 @@ class NodeBudgetVariation(BudgetVariation):
other_uid_list.append(node.getUid()) other_uid_list.append(node.getUid())
return {axis: NegatedQuery(Query(**{axis: other_uid_list}))} return {axis: NegatedQuery(Query(**{axis: other_uid_list}))}
return {axis: return {axis:
self.getPortalObject().unrestrictedTraverse(node_url).getUid()} portal_categories.getCategoryValue(node_url, base_category=criterion_base_category).getUid()}
return dict() return dict()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment