Skip to content

Commit

Permalink
protect campaign creation against missing arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
eacharles committed Aug 15, 2024
1 parent bc320f1 commit 4cf503f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lsst/cmservice/db/campaign.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4cf503f

Please sign in to comment.