Skip to content

Commit

Permalink
datasource_tenant_projects, fixed no IDs check
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Pearce <ben.pearce@octopus.com>
  • Loading branch information
domenicsim1 and benPearce1 authored Aug 16, 2024
1 parent c04d33d commit cbe3f22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion octopusdeploy_framework/datasource_tenant_projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (t *tenantProjectsDataSource) Read(ctx context.Context, req datasource.Read
environmentIDs := util.ExpandStringList(data.EnvironmentIDs)
spaceID := data.SpaceID.ValueString()

if tenantIDs == nil && projectIDs == nil {
if (tenantIDs == nil || len(tenantIDs) == 0) && (projectIDs == nil || len(projectIDs) == 0) {
resp.Diagnostics.AddError("must provide at least one tenant or one project", "tenant IDs and project IDs are nil")
}

Expand Down

0 comments on commit cbe3f22

Please sign in to comment.