From d6e92a2347e0452622735b050e9c15c28315fe5c Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Fri, 13 Nov 2015 13:58:03 -0700 Subject: [PATCH] Append additional measurements to compare Fixes #21 --- api/compare.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/compare.go b/api/compare.go index cfb728c..e7d77fa 100644 --- a/api/compare.go +++ b/api/compare.go @@ -60,7 +60,11 @@ func HandleCompare(w http.ResponseWriter, r *http.Request) *types.AppError { if m.Notes.Valid { values[strainID] = fmt.Sprintf("%s (%s)", m.Value(), m.Notes.String) } else { - values[strainID] = m.Value() + if values[strainID] != "" { + values[strainID] = fmt.Sprintf("%s, %s", values[strainID], m.Value()) + } else { + values[strainID] = m.Value() + } } } }