Skip to content

Commit

Permalink
Prevent empty migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
bzurkowski committed Mar 26, 2017
1 parent 5fb162d commit a615bfd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mas_migration.erl
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ group(Destinations, Agents) ->
%%------------------------------------------------------------------------------
%% @private
%%------------------------------------------------------------------------------
send_to_node({_Node, []}) -> ok;
send_to_node({Node, Agents}) ->
mas_world:migrate_agents(Node, Agents).

%%------------------------------------------------------------------------------
%% @private
%%------------------------------------------------------------------------------
send_to_population({_Population, []}) -> ok;
send_to_population({Population, Agents}) ->
mas_population:add_agents(Population, Agents).

0 comments on commit a615bfd

Please sign in to comment.