[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/10: Avoid crashing when no compare arguments are provided
From: |
Christopher Baines |
Subject: |
01/10: Avoid crashing when no compare arguments are provided |
Date: |
Sat, 21 Nov 2020 16:11:42 -0500 (EST) |
cbaines pushed a commit to branch master
in repository data-service.
commit c751031a263a2adc00149c5c8a05446bbdfc2c12
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Sat Nov 21 16:49:58 2020 +0000
Avoid crashing when no compare arguments are provided
---
guix-data-service/web/compare/controller.scm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/guix-data-service/web/compare/controller.scm
b/guix-data-service/web/compare/controller.scm
index df7e89a..5edd922 100644
--- a/guix-data-service/web/compare/controller.scm
+++ b/guix-data-service/web/compare/controller.scm
@@ -182,14 +182,16 @@
(($ <invalid-query-parameter> value)
(with-thread-postgresql-connection
(lambda (conn)
- (select-job-for-commit conn value))))
+ (and (string? value)
+ (select-job-for-commit conn value)))))
(_ #f)))
(target-job
(match (assq-ref query-parameters 'target_commit)
(($ <invalid-query-parameter> value)
(with-thread-postgresql-connection
(lambda (conn)
- (select-job-for-commit conn value))))
+ (and (string? value)
+ (select-job-for-commit conn value)))))
(_ #f))))
(case (most-appropriate-mime-type
'(application/json text/html)
- branch master updated (3e15900 -> e93da1a), Christopher Baines, 2020/11/21
- 01/10: Avoid crashing when no compare arguments are provided,
Christopher Baines <=
- 04/10: Improve the comparison page interface, Christopher Baines, 2020/11/21
- 02/10: Avoid errors in form-horizontal-control, Christopher Baines, 2020/11/21
- 03/10: Specify an invalid parameter message in parse-datetime, Christopher Baines, 2020/11/21
- 05/10: Add default datetimes for compare-by-datetime, Christopher Baines, 2020/11/21
- 06/10: Fix some links on the compare page, Christopher Baines, 2020/11/21
- 09/10: Consolidate the package derivation comparison code, Christopher Baines, 2020/11/21
- 08/10: Start merging the package derivation comparison code, Christopher Baines, 2020/11/21
- 07/10: Extract out the compare form controls, Christopher Baines, 2020/11/21
- 10/10: Fix the JSON link on the compare package derivations page, Christopher Baines, 2020/11/21