Support non-float slots
authorSverre Rabbelier <srabbelier@gmail.com>
Sun, 08 Mar 2009 02:13:15 +0000
changeset 1737 9dc63101b107
parent 1736 72fb61f67ff5
child 1738 452f16ebe8d2
Support non-float slots This is for easier interaction with the frontend. Patch by: Sverre Rabbelier
app/soc/logic/allocations.py
--- a/app/soc/logic/allocations.py	Sun Mar 08 02:05:12 2009 +0000
+++ b/app/soc/logic/allocations.py	Sun Mar 08 02:13:15 2009 +0000
@@ -151,7 +151,7 @@
     """Returns the amount of slots for the org within the required bounds.
     """
 
-    slots = int(math.floor(slots))
+    slots = int(math.floor(float(slots)))
     slots = min(slots, self.max_slots_per_org)
     slots = max(slots, self.min_slots_per_org)
     slots = min(slots, self.mentors[org])