From 8b7d461c2161bb6736eee7cdbb956a4502c5c936 Mon Sep 17 00:00:00 2001 From: Lucy Cifferello <12953208+elvece@users.noreply.github.com> Date: Fri, 28 Jul 2023 19:19:07 -0400 Subject: [PATCH] make index package arches optional --- src/Handler/Admin.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Handler/Admin.hs b/src/Handler/Admin.hs index 1a7c4f0..03009cd 100644 --- a/src/Handler/Admin.hs +++ b/src/Handler/Admin.hs @@ -221,7 +221,7 @@ instance FromJSON IndexPkgReq where parseJSON = withObject "Index Package Request" $ \o -> do indexPkgReqId <- o .: "id" indexPkgReqVersion <- o .: "version" - indexPkgReqArches <- o .: "arches" + indexPkgReqArches <- o .:? "arches" pure IndexPkgReq{..} instance ToJSON IndexPkgReq where toJSON IndexPkgReq{..} = object ["id" .= indexPkgReqId, "version" .= indexPkgReqVersion]