If nothing is assigned, return no assignments
authorSverre Rabbelier <srabbelier@gmail.com>
Thu, 09 Apr 2009 22:04:47 +0000
changeset 2137 3d5692ae414c
parent 2136 5d55e61dd338
child 2138 70b4a5e90eb0
If nothing is assigned, return no assignments Before the popularity was returned instead. Patch by: Sverre Rabbelier
app/soc/logic/allocations.py
--- a/app/soc/logic/allocations.py	Wed Apr 08 23:45:41 2009 +0000
+++ b/app/soc/logic/allocations.py	Thu Apr 09 22:04:47 2009 +0000
@@ -88,7 +88,7 @@
     self.buildSets()
 
     if not sum(self.popularity.values()) or not sum(self.max.values()):
-      return self.popularity
+      return dict([(i, 0) for i in self.orgs])
 
     if self.iterative:
       return self.iterativeAllocation()