Skip to content

Commit

Permalink
fix for list of timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
rpiazza committed Nov 20, 2024
1 parent 88f5fa8 commit 6465249
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions stix2/datastore/relational_db/relational_db_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ def test_hex_list():
],
),
),
(
"list_of_timestamps",
stix2.properties.ListProperty(stix2.properties.TimestampProperty()),
),
],
"extension-definition--15de9cdb-1234-4271-8479-8141154c5647",
is_sdo=True,
Expand All @@ -260,6 +264,7 @@ class Test3Class:
def test_dictionary():
return Test3Class(
prop_name={"a": 1, "b": 2.3, "c": "foo"},
list_of_timestamps={ "2016-05-12T08:17:27.000Z", "2024-05-12T08:17:27.000Z"}
)


Expand Down
2 changes: 1 addition & 1 deletion stix2/datastore/relational_db/table_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ def generate_table_information(self, name, db_backend, metadata, schema_name, ta
elif ((
isinstance(
self.contained,
(BinaryProperty, BooleanProperty, StringProperty, IntegerProperty, FloatProperty, HexProperty),
(BinaryProperty, BooleanProperty, StringProperty, IntegerProperty, FloatProperty, HexProperty, TimestampProperty),
) and
not db_backend.array_allowed()
) or
Expand Down

0 comments on commit 6465249

Please sign in to comment.