app/soc/logic/allocations.py
changeset 1737 9dc63101b107
parent 1721 9acf4fe1b9bb
child 1748 f789ffe213a3
equal deleted inserted replaced
1736:72fb61f67ff5 1737:9dc63101b107
   149 
   149 
   150   def rangeSlots(self, slots, org):
   150   def rangeSlots(self, slots, org):
   151     """Returns the amount of slots for the org within the required bounds.
   151     """Returns the amount of slots for the org within the required bounds.
   152     """
   152     """
   153 
   153 
   154     slots = int(math.floor(slots))
   154     slots = int(math.floor(float(slots)))
   155     slots = min(slots, self.max_slots_per_org)
   155     slots = min(slots, self.max_slots_per_org)
   156     slots = max(slots, self.min_slots_per_org)
   156     slots = max(slots, self.min_slots_per_org)
   157     slots = min(slots, self.mentors[org])
   157     slots = min(slots, self.mentors[org])
   158 
   158 
   159     return slots
   159     return slots