From 344a8297815eb9f936f40b675100012e91bcee8a Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Thu, 15 Aug 2024 10:25:31 -0700 Subject: [PATCH] protect campaign creation against missing arguments --- src/lsst/cmservice/db/campaign.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lsst/cmservice/db/campaign.py b/src/lsst/cmservice/db/campaign.py index 50b95c26..2d7828e5 100644 --- a/src/lsst/cmservice/db/campaign.py +++ b/src/lsst/cmservice/db/campaign.py @@ -186,9 +186,17 @@ async def get_create_kwargs( ) data = kwargs.get("data", {}) + if data is None: + data = {} child_config = kwargs.get("child_config", {}) + if child_config is None: + child_config = {} collections = kwargs.get("collections", {}) + if collections is None: + collections = {} spec_aliases = kwargs.get("spec_aliases", {}) + if spec_aliases is None: + spec_aliases = {} await session.refresh( specification,