Commit d807fbca authored by Kevin Di Lallo's avatar Kevin Di Lallo
Browse files

app instance initialization fix

parent 4ff40f4f
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -2050,15 +2050,21 @@ func refreshApps() error {
		return err
		return err
	}
	}


	// Create app info for new apps
	// Update app info
	for _, app := range appList {
	for _, app := range appList {
		found := false
		found := false
		for _, appInfo := range appInfoList {
		for _, appInfo := range appInfoList {
			if appInfo[fieldAppId] == app.Id {
			if appInfo[fieldAppId] == app.Id {
				found = true
				found = true
				// Set existing app info to make sure cache is updated
				err = setAppInfo(appInfo)
				if err != nil {
					log.Error(err.Error())
				}
				break
				break
			}
			}
		}
		}
		// Create & set app info for new apps
		if !found {
		if !found {
			appInfo, err := newAppInfo(app)
			appInfo, err := newAppInfo(app)
			if err != nil {
			if err != nil {
+7 −1
Original line number Original line Diff line number Diff line
@@ -784,15 +784,21 @@ func refreshApps() error {
		return err
		return err
	}
	}


	// Create app info for new apps
	// Update app info
	for _, app := range appList {
	for _, app := range appList {
		found := false
		found := false
		for _, appInfo := range appInfoList {
		for _, appInfo := range appInfoList {
			if appInfo[fieldAppId] == app.Id {
			if appInfo[fieldAppId] == app.Id {
				found = true
				found = true
				// Set existing app info to make sure cache is updated
				err = setAppInfo(appInfo)
				if err != nil {
					log.Error(err.Error())
				}
				break
				break
			}
			}
		}
		}
		// Create & set app info for new apps
		if !found {
		if !found {
			appInfo, err := newAppInfo(app)
			appInfo, err := newAppInfo(app)
			if err != nil {
			if err != nil {