From 3569a36c1b10495324c69d7488d657ef38e9e770 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Tue, 3 Jun 2025 09:02:56 +0200 Subject: [PATCH] cleanup: Avoid nested if statment Co-authored-by: Andre Duffeck --- services/graph/pkg/odata/odata.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/graph/pkg/odata/odata.go b/services/graph/pkg/odata/odata.go index ae40d85a19..c976c7a993 100644 --- a/services/graph/pkg/odata/odata.go +++ b/services/graph/pkg/odata/odata.go @@ -34,10 +34,10 @@ func collectExpandPaths(item *godata.ExpandItem, prefix string) ([]string, error // Build the current path currentPath := prefix - if len(item.Path) > 0 { - if len(item.Path) > 1 { - return nil, godata.NotImplementedError("multiple segments in $expand not supported") - } + if len(item.Path) > 1 { + return nil, godata.NotImplementedError("multiple segments in $expand not supported") + } + if len(item.Path) == 1 { if currentPath == "" { currentPath = item.Path[0].Value } else {