diff --git a/dictionaryutils/__init__.py b/dictionaryutils/__init__.py index aa29303..ec1b265 100644 --- a/dictionaryutils/__init__.py +++ b/dictionaryutils/__init__.py @@ -278,7 +278,7 @@ def allow_nulls(self): if not isinstance(prop["enum"], list): prop["enum"] = [prop["enum"]] prop["enum"].append(None) - elif "anyOf" in prop: + elif "anyOf" in prop and {"type": "null"} not in prop["anyOf"]: prop["anyOf"].append({"type": "null"}) - elif "oneOf" in prop: + elif "oneOf" in prop and {"type": "null"} not in prop["oneOf"]: prop["oneOf"].append({"type": "null"}) diff --git a/pyproject.toml b/pyproject.toml index 5027554..64121aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "dictionaryutils" -version = "3.4.5" +version = "3.4.6" description = "Python wrapper and metaschema for datadictionary." authors = ["CTDS UChicago "] license = "Apache-2.0"