Skip to content
This repository was archived by the owner on May 4, 2026. It is now read-only.

Commit bcf7875

Browse files
committed
Allowing to import only fields that are available
1 parent c705087 commit bcf7875

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

blueprints/assessment_import.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ def importentire():
152152
"outcome", "testcasescore", "alertseverityscore", "expectedincidentcreation",
153153
"incidentcreated", "incidentseverity", "incidentseverityscore", "eventtoalert",
154154
"alerttoincident", "expectedalertcreation", "expectedprevention", "requirements"]:
155-
newTestcase[field] = oldTestcase[field]
155+
if field in oldTestcase:
156+
newTestcase[field] = oldTestcase[field]
156157

157158
for field in ["starttime", "endtime", "detecttime", "modifytime", "alerttime", "preventtime" ,"incidenttime" ]:
158159
if oldTestcase[field] != "None":

0 commit comments

Comments
 (0)