author | Sverre Rabbelier <srabbelier@gmail.com> |
Fri, 10 Apr 2009 11:27:33 +0000 | |
changeset 2143 | 67c1cb524b78 |
parent 2142 | 573301607587 |
child 2144 | 725d9afb6572 |
--- a/app/soc/logic/allocations.py Fri Apr 10 11:27:15 2009 +0000 +++ b/app/soc/logic/allocations.py Fri Apr 10 11:27:33 2009 +0000 @@ -277,6 +277,10 @@ total_popularity = sum(self.popularity.values()) + # all orgs have been locked, nothing to do + if total_popularity <= 0: + return allocations + pop_per_slot = float(available_slots)/float(total_popularity) slack = 0