From fed383cb45f990bfd542514c42a24e88ed8a350e Mon Sep 17 00:00:00 2001
From: Michiel Cottaar <michiel.cottaar@ndcn.ox.ac.uk>
Date: Thu, 15 Feb 2024 18:58:41 +0000
Subject: [PATCH] Fix iterating over WaitBlock

---
 src/all_building_blocks/wait_blocks.jl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/all_building_blocks/wait_blocks.jl b/src/all_building_blocks/wait_blocks.jl
index 004c5fb..f55383f 100644
--- a/src/all_building_blocks/wait_blocks.jl
+++ b/src/all_building_blocks/wait_blocks.jl
@@ -17,7 +17,7 @@ struct Wait <: BaseBuildingBlock
 end
 
 duration(wb::Wait) = wb.duration
-Base.keys(::Wait) = (:empty)
-Base.getindex(wb::Wait) = NoGradient{1}(wb.duration)
+Base.keys(::Wait) = (Val(:empty),)
+Base.getindex(wb::Wait, ::Val{:empty}) = NoGradient{1}(wb.duration)
 
 end
\ No newline at end of file
-- 
GitLab