X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=bluechips%2Ftemplates%2Fspend%2Findex.mako;h=dc2f606070dd8a4cd8164164092674fd23ab16d7;hb=c419902fc831dc8077c74a8e8a88da081dbe4cf0;hp=6198b0fe7531f973db62b8d5246dd95a13123834;hpb=2157c7842d2f8c5b01e3bad295dd276f505e99c4;p=bluechips.git diff --git a/bluechips/templates/spend/index.mako b/bluechips/templates/spend/index.mako index 6198b0f..dc2f606 100644 --- a/bluechips/templates/spend/index.mako +++ b/bluechips/templates/spend/index.mako @@ -33,17 +33,11 @@ try: percent = c.values['shares-%d.amount' % ii] except TypeError: - if c.id != '': - try: - share = [s.share for s in c.expenditure.splits if s.user == user][0] - percent = (Decimal(100) * Decimal(int(share)) / Decimal(int(c.expenditure.amount))).quantize(Decimal("0.001")) - except IndexError: - percent = 0 - else: - if user == request.environ['user']: - percent = 1 - else: - percent = 0 + try: + share = [s.share for s in c.expenditure.splits if s.user == user][0] + percent = (Decimal(100) * Decimal(int(share)) / Decimal(int(c.expenditure.amount))).quantize(Decimal("0.001")) + except IndexError: + percent = 0 %>