Skip any empty range/boundary elements, not only nil ones.

This commit is contained in:
Julius Volz 2013-05-28 12:46:53 +02:00
parent 20d49ea169
commit 21c3be0814

View file

@ -126,7 +126,7 @@ func (v *viewAdapter) GetValueAtTime(fingerprints model.Fingerprints, timestamp
func (v *viewAdapter) GetBoundaryValues(fingerprints model.Fingerprints, interval *model.Interval) (sampleSets []model.SampleSet, err error) {
for _, fingerprint := range fingerprints {
samplePairs := v.view.GetBoundaryValues(fingerprint, *interval)
if samplePairs == nil {
if len(samplePairs) == 0 {
continue
}
@ -148,7 +148,7 @@ func (v *viewAdapter) GetBoundaryValues(fingerprints model.Fingerprints, interva
func (v *viewAdapter) GetRangeValues(fingerprints model.Fingerprints, interval *model.Interval) (sampleSets []model.SampleSet, err error) {
for _, fingerprint := range fingerprints {
samplePairs := v.view.GetRangeValues(fingerprint, *interval)
if samplePairs == nil {
if len(samplePairs) == 0 {
continue
}