This got broken due to applying some review suggestions without proper testing. This fixes commit 5e72c0afe5. Closes https://github.com/FreeCAD/FreeCAD/issues/21231.
5e72c0afe5
Co-authored-by: Benjamin Bræstrup Sayoc <benj5378@outlook.com>