Skip to content

Commit 5698e1b

Browse files
authored
Merge pull request #425 from gaurav-dalvi/issue-423
issue-423- commit-1
2 parents 6e96e82 + 9e0e5ee commit 5698e1b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

netmaster/objApi/apiController.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,6 @@ func (ac *APIController) AppProfileCreate(prof *contivModel.AppProfile) error {
231231
return core.Errorf("Tenant %s not found", prof.TenantName)
232232
}
233233

234-
// Setup links
235-
modeldb.AddLink(&prof.Links.Tenant, tenant)
236-
modeldb.AddLinkSet(&tenant.LinkSets.AppProfiles, prof)
237-
238234
for _, epg := range prof.EndpointGroups {
239235
epgKey := prof.TenantName + ":" + epg
240236
epgObj := contivModel.FindEndpointGroup(epgKey)
@@ -250,6 +246,10 @@ func (ac *APIController) AppProfileCreate(prof *contivModel.AppProfile) error {
250246
}
251247
}
252248

249+
// Setup links
250+
modeldb.AddLink(&prof.Links.Tenant, tenant)
251+
modeldb.AddLinkSet(&tenant.LinkSets.AppProfiles, prof)
252+
253253
err := tenant.Write()
254254
if err != nil {
255255
log.Errorf("Error updating tenant state(%+v). Err: %v", tenant, err)

0 commit comments

Comments
 (0)