This commit is contained in:
@@ -109,9 +109,11 @@ func (h *Handler) GetIncident(w http.ResponseWriter, r *http.Request) {
|
|||||||
// get worknotes for this incident
|
// get worknotes for this incident
|
||||||
for _, note := range wknList {
|
for _, note := range wknList {
|
||||||
if note.IncidentNumber == inc.IncidentNumber.String {
|
if note.IncidentNumber == inc.IncidentNumber.String {
|
||||||
|
if note.Note.Valid {
|
||||||
wkn = append(wkn, note.Note.String)
|
wkn = append(wkn, note.Note.String)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// transform inc to SingleIncidentResponse
|
// transform inc to SingleIncidentResponse
|
||||||
r := models.SingleIncidentResponse{
|
r := models.SingleIncidentResponse{
|
||||||
@@ -214,9 +216,12 @@ func (h *Handler) getSingleIncident(number string, ctx context.Context) ([]byte,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, note := range wknotes {
|
for _, note := range wknotes {
|
||||||
|
if note.Note.Valid {
|
||||||
wkn = append(wkn, note.Note.String)
|
wkn = append(wkn, note.Note.String)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// convert from database resposne to expected json format
|
// convert from database resposne to expected json format
|
||||||
r := models.SingleIncidentResponse{
|
r := models.SingleIncidentResponse{
|
||||||
Number: incResult.IncidentNumber.String,
|
Number: incResult.IncidentNumber.String,
|
||||||
|
Reference in New Issue
Block a user