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>
(cherry picked from commit 0f9d22cd66)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
This commit is contained in:
Vincent Demeester 2017-03-15 10:46:06 +01:00 committed by Victor Vieux
parent c97450059d
commit fbd3d64212

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)
}