From 8bfb7bf324520738ebda24f2c1efde4c092dfce3 Mon Sep 17 00:00:00 2001 From: Adriano Meligrana <68152031+Tortar@users.noreply.github.com> Date: Mon, 9 Sep 2024 16:24:44 +0200 Subject: [PATCH] Update graph.jl --- src/spaces/graph.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spaces/graph.jl b/src/spaces/graph.jl index 806f4b8da..44ab4ca00 100644 --- a/src/spaces/graph.jl +++ b/src/spaces/graph.jl @@ -71,7 +71,7 @@ function remove_agent_from_space!(a::AbstractAgent, model::ABM{<:GraphSpace}) ai = findfirst(id -> id == a.id, ids) isnothing(ai) && error(lazy"Tried to remove agent with ID $(a.id) from the space, but that agent is not on the space") deleteat!(ids, ai) - return agent + return a end function add_agent_to_space!(agent::AbstractAgent, model::ABM{<:GraphSpace})