From b6e42430fdaf2004791197329003d5bbadaedb91 Mon Sep 17 00:00:00 2001 From: Brett Date: Sat, 6 Apr 2024 14:53:38 -0400 Subject: [PATCH] allow ModelContainer(None) for subclass --- jwst/datamodels/container.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jwst/datamodels/container.py b/jwst/datamodels/container.py index 2a560f3aa00..5b6baa71c81 100644 --- a/jwst/datamodels/container.py +++ b/jwst/datamodels/container.py @@ -138,6 +138,8 @@ def __init__(self, init=None, asn_exptypes=None, asn_n_members=None, self._memmap = kwargs.get("memmap", False) + if init is None: + init = [] if isinstance(init, list): self._models = [] for item in init: