parent
5e5121fc65
commit
d6e92a2347
1 changed files with 5 additions and 1 deletions
|
@ -59,11 +59,15 @@ func HandleCompare(w http.ResponseWriter, r *http.Request) *types.AppError {
|
|||
if (m.CharacteristicID == characteristicIDInt) && (m.StrainID == strainIDInt) {
|
||||
if m.Notes.Valid {
|
||||
values[strainID] = fmt.Sprintf("%s (%s)", m.Value(), m.Notes.String)
|
||||
} else {
|
||||
if values[strainID] != "" {
|
||||
values[strainID] = fmt.Sprintf("%s, %s", values[strainID], m.Value())
|
||||
} else {
|
||||
values[strainID] = m.Value()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// If the strain doesn't have a measurement for this characteristic,
|
||||
// stick an empty value in anyway (for CSV).
|
||||
if _, ok := values[strainID]; !ok {
|
||||
|
|
Reference in a new issue