Skip to content

Commit

Permalink
Fix #592
Browse files Browse the repository at this point in the history
  • Loading branch information
failys committed Dec 3, 2020
1 parent 0ffcee7 commit bd920c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions cairis/core/TrustBoundary.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def __init__(self,tbId = -1,tbName = '',tbType = 'General', tbDesc = '',comps =
self.theTags = tags

def id(self): return self.theId
def setId(self,anId): self.theId = anId
def name(self): return self.theName
def type(self): return self.theType
def description(self): return self.theDescription
Expand Down
7 changes: 6 additions & 1 deletion cairis/mio/ModelImport.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,12 @@ def importTrustBoundaries(tbs,session_id):
b = Borg()
db_proxy = b.get_dbproxy(session_id)
for tb in tbs:
db_proxy.addTrustBoundary(tb)
objtId = db_proxy.existingObject(tb.name(),'trust_boundary')
if objtId == -1:
db_proxy.addTrustBoundary(tb)
else:
tb.setId(objtId)
db_proxy.updateTrustBoundary(tb)
noOfTrustBoundaries = len(tbs)
msgStr = 'Imported ' +str( noOfTrustBoundaries) + ' trust boundar'
if (noOfTrustBoundaries != 1):
Expand Down

0 comments on commit bd920c6

Please sign in to comment.