Merge pull request #828 from openziti/fix-panic-on-session-view

Fix panic on session view
This commit is contained in:
Paul Lorenz
2021-11-02 19:10:29 -04:00
committed by GitHub
@@ -117,7 +117,7 @@ func MapSessionToRestModel(ae *env.AppEnv, sessionModel *model.Session) (*rest_m
servicePolicyRefs := []*rest_model.EntityRef{} //send `[]` not `null`
for _, servicePolicyId := range sessionModel.ServicePolicies {
if policy, err := ae.GetHandlers().ServicePolicy.Read(servicePolicyId); err != nil {
if policy, _ := ae.GetHandlers().ServicePolicy.Read(servicePolicyId); policy != nil {
ref := &rest_model.EntityRef{
Links: ServicePolicyLinkFactory.Links(policy),
Entity: EntityNameServicePolicy,