Skip to content

Commit

Permalink
handle when the extension needs the id from the object
Browse files Browse the repository at this point in the history
  • Loading branch information
rpiazza committed Apr 4, 2024
1 parent eb4b2f1 commit 3042ddc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stix2/datastore/relational_db/input_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def generate_insert_information(self, name, stix_object, level=0, is_extension=F
table = data_sink.tables_dictionary[canonicalize_table_name(table_name + "_" + name)]
for idx, item in enumerate(stix_object[name]):
bindings = {
"id": stix_object["id"],
"id": stix_object["id"] if id in stix_object else foreign_key_value,
"ref_id": item,
}
insert_statements.append(insert(table).values(bindings))
Expand Down

0 comments on commit 3042ddc

Please sign in to comment.