Fix empty shard ID on repos page (#43704)

Previously, this resolver would not return `null` but an empty string. This fixes it so that the "Not assigned" banner is properly shown in the UI.
This commit is contained in:
Erik Seliger 2022-11-01 14:46:00 +01:00 committed by GitHub
parent e6ac5f3117
commit a6e72a5983
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -181,7 +181,11 @@ func (r *repositoryMirrorInfoResolver) Shard(ctx context.Context) (*string, erro
return nil, err
}
return &info.ShardID, err
if info.ShardID == "" {
return nil, nil
}
return &info.ShardID, nil
}
func (r *repositoryMirrorInfoResolver) UpdateSchedule(ctx context.Context) (*updateScheduleResolver, error) {