Fix default robot direction

I am not sure what it was doing, but it was not what
I expected. Now it should accept missing dir field.
This commit is contained in:
Ondřej Šebek 2022-10-05 21:37:51 +02:00
parent faad903863
commit 956dcb9ecf

View File

@ -497,7 +497,7 @@ instance FromJSONE EntityMap TRobot where
<$> liftE (v .: "name")
<*> liftE (v .:? "description" .!= [])
<*> liftE (v .:? "loc")
<*> liftE (v .: "dir" .!= zero)
<*> liftE (v .:? "dir" .!= zero)
<*> liftE (v .:? "display" .!= defaultRobotDisplay)
<*> liftE (mkMachine <$> (v .:? "program"))
<*> v ..:? "devices" ..!= []