]> asedeno.scripts.mit.edu Git - bluechips.git/blobdiff - bluechips/templates/spend/index.mako
default to an even split among residents again
[bluechips.git] / bluechips / templates / spend / index.mako
index 6198b0fe7531f973db62b8d5246dd95a13123834..dc2f606070dd8a4cd8164164092674fd23ab16d7 100644 (file)
         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
       %>
       <tr>
         <th>