Skip to content

Commit 7f6754b

Browse files
committed
Tenant delete issue- Commit 2
1 parent a1b5c34 commit 7f6754b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

netmaster/objApi/apiController.go

+8
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,14 @@ func (ac *APIController) PolicyDelete(policy *contivModel.Policy) error {
872872

873873
//Remove Links
874874
modeldb.RemoveLinkSet(&tenant.LinkSets.Policies, policy)
875+
876+
// Save the tenant too since we added the links
877+
err := tenant.Write()
878+
if err != nil {
879+
log.Errorf("Error updating tenant state(%+v). Err: %v", tenant, err)
880+
return err
881+
}
882+
875883
return nil
876884
}
877885

0 commit comments

Comments
 (0)