diff --git a/src/popy/pop_maker.py b/src/popy/pop_maker.py index 0e8fc00..714b156 100644 --- a/src/popy/pop_maker.py +++ b/src/popy/pop_maker.py @@ -240,7 +240,7 @@ def make_it_a_list_if_it_is_no_list(x): # if agents are not assigned and all locations are full if not assigned and location_dummy.allow_overcrowding: # sort by the number of assigned agents - group_lists.sort(key=lambda x: x.len()) + group_lists.sort(key=lambda x: len(x)) # assign agents to the group_list with the fewest members for agent in sticky_agents: