Replace API version comparison by a if

… as we don't know for sure what API version it will be at that time.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester 2017-03-15 10:46:06 +01:00
parent 0b9b7906af
commit 0f9d22cd66
No known key found for this signature in database
GPG key ID: 083CC6FD6EB699A3

View file

@ -253,9 +253,9 @@ func (s *imageRouter) getImagesJSON(ctx context.Context, w http.ResponseWriter,
return err
}
version := httputils.VersionFromContext(ctx)
filterParam := r.Form.Get("filter")
if versions.LessThanOrEqualTo(version, "1.28") && filterParam != "" {
// FIXME(vdemeester) This has been deprecated in 1.13, and is target for removal for v17.12
if filterParam != "" {
imageFilters.Add("reference", filterParam)
}