diff --git a/src/Storage/Controllers/InstancesController.cs b/src/Storage/Controllers/InstancesController.cs index e2ece4cb..a1ea34df 100644 --- a/src/Storage/Controllers/InstancesController.cs +++ b/src/Storage/Controllers/InstancesController.cs @@ -137,12 +137,6 @@ public async Task>> GetInstances(InstanceQu return Forbid(); } } - - // Default for service owners is to exclude migrated altinn 1 and 2 instances - if (queryParameters.MainVersionExclude == null && queryParameters.MainVersionInclude == null) - { - queryParameters.MainVersionInclude = 3; - } } else if (userId is not null || systemUser is not null) { @@ -229,6 +223,12 @@ public async Task>> GetInstances(InstanceQu queryParameters.SortBy = "desc:lastChanged"; } + // Default is to exclude migrated altinn 1 and 2 instances + if (queryParameters.MainVersionExclude == null && queryParameters.MainVersionInclude == null) + { + queryParameters.MainVersionInclude = 3; + } + queryParameters.Size ??= 100; try