Commit 52eddc9b authored by Jérome Perrin's avatar Jérome Perrin

budget: transaction-cache BudgetLine.getAvailableBudgetDict

Eventhough _getBudgetDict was cached, getAvailableBudgetDict also
calculates getCurrentBudget for each cell, which is also heavy.
parent 8ecececb
Pipeline #16058 failed with stage
in 0 seconds
......@@ -111,6 +111,8 @@ class BudgetLine(Predicate, XMLMatrix, VariatedMixin):
security.declareProtected(Permissions.AccessContentsInformation,
'getAvailableBudgetDict')
@transactional_cached(key_method=lambda self, *args, **kw:
(self.getRelativeUrl(), tuple(kw.items())))
def getAvailableBudgetDict(self, **kw):
"""Returns all the engagements in a dict where the keys are the cells, and
the value is the engaged budget.
......
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