From fe9818768d7c000ea0a0f815475c45ecd1601fde Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 1 Apr 2024 13:02:35 -0400 Subject: [PATCH] small chages --- stix2/properties.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stix2/properties.py b/stix2/properties.py index 1c7a5c87..efa21e8e 100644 --- a/stix2/properties.py +++ b/stix2/properties.py @@ -404,10 +404,12 @@ class DictionaryProperty(Property): def __init__(self, valid_types=None, spec_version=DEFAULT_VERSION, **kwargs): self.spec_version = spec_version - simple_types = [BinaryProperty, BooleanProperty, FloatProperty, HashesProperty, HexProperty, IDProperty, IntegerProperty, StringProperty, TimestampProperty] + simple_types = [BinaryProperty, BooleanProperty, FloatProperty, HexProperty, IntegerProperty, StringProperty, TimestampProperty] if not valid_types: valid_types = [Property] else: + if not isinstance(valid_types, list): + valid_types = [valid_types] for type_ in valid_types: if isinstance(type_, ListProperty): found = False