Skip to content

Commit 6465249

Browse files
committed
fix for list of timestamps
1 parent 88f5fa8 commit 6465249

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

stix2/datastore/relational_db/relational_db_testing.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,10 @@ def test_hex_list():
249249
],
250250
),
251251
),
252+
(
253+
"list_of_timestamps",
254+
stix2.properties.ListProperty(stix2.properties.TimestampProperty()),
255+
),
252256
],
253257
"extension-definition--15de9cdb-1234-4271-8479-8141154c5647",
254258
is_sdo=True,
@@ -260,6 +264,7 @@ class Test3Class:
260264
def test_dictionary():
261265
return Test3Class(
262266
prop_name={"a": 1, "b": 2.3, "c": "foo"},
267+
list_of_timestamps={ "2016-05-12T08:17:27.000Z", "2024-05-12T08:17:27.000Z"}
263268
)
264269

265270

stix2/datastore/relational_db/table_creation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ def generate_table_information(self, name, db_backend, metadata, schema_name, ta
654654
elif ((
655655
isinstance(
656656
self.contained,
657-
(BinaryProperty, BooleanProperty, StringProperty, IntegerProperty, FloatProperty, HexProperty),
657+
(BinaryProperty, BooleanProperty, StringProperty, IntegerProperty, FloatProperty, HexProperty, TimestampProperty),
658658
) and
659659
not db_backend.array_allowed()
660660
) or

0 commit comments

Comments
 (0)