aboutsummaryrefslogtreecommitdiff
path: root/http_handle_repo_contrib_one.go
diff options
context:
space:
mode:
Diffstat (limited to 'http_handle_repo_contrib_one.go')
-rw-r--r--http_handle_repo_contrib_one.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/http_handle_repo_contrib_one.go b/http_handle_repo_contrib_one.go
index 6841f2b..0691050 100644
--- a/http_handle_repo_contrib_one.go
+++ b/http_handle_repo_contrib_one.go
@@ -16,7 +16,7 @@ func handle_repo_contrib_one(w http.ResponseWriter, r *http.Request, params map[
}
var title, status, source_ref, destination_branch string
- err = database.QueryRow(r.Context(), "SELECT title, status, source_ref, destination_branch FROM merge_requests WHERE id = $1", mr_id).Scan(&title, &status, &source_ref, &destination_branch)
+ err = database.QueryRow(r.Context(), "SELECT COALESCE(title, ''), status, source_ref, COALESCE(destination_branch, '') FROM merge_requests WHERE id = $1", mr_id).Scan(&title, &status, &source_ref, &destination_branch)
if err != nil {
http.Error(w, "Error querying merge request: "+err.Error(), http.StatusInternalServerError)
return